Wednesday, February 28, 2018

Basic data types and Variables in java

Basic data types and variables are the building block of any programming language , and java is also one of them .Welcome back, dear readers. I know what you’re all thinking: “Yeah, finally I wrote my first code! Woo hoo!”. Then eventually you’ll start thinking: “Wait, that’s Javaprogramming? How do use that that to make cool apps and games?”. At least that’s what I thought when I started. I know that doesn’t look like much now, but don’t worry, that was just an intro. We’ll do way more as we go along.

Before We more further , below are the previous post link of the seires
Keep in mind that the more we learn, the harder it gets. I’ll be happy to teach you a lot on programming, but for it to really stick, you’ll need to build on what you learn here for it to stick. By that I mean doing a lot of practicing and experimentation Sometimes the best way to know what to do, is to find out what not to do.
So let’s get started.


Now, programs work by manipulating data that is being inputted and stored in the computer. This data can be numbers, texts, objects, lists, links to other memory areas and so on. The data is given a name, so that it can be recalled whenever it is needed. The name and data type is called a variable.
You can think of variables like a box. If I have a box, or variable, for storing food, and I call it my Fridge (because it’s obviously a fridge), then I can put stuff like milk, cheese and baloney into my fridge (because variables are variable, they can easily be reassigned new values). So in a way you can say the data type is box, the variable name is Fridge, and the data stored is, let’s say, milk.
Now the standard format for assigning variables in Java (and most other languages) is this:
(Data Type) (Variable Name) = (Data to be stored);
So using this logic, this s how we put stuff in our fridge:
box Fridge = Milk;
(Never forget the semicolons!)

See also Top 10 Interview Questions

Now like most things, the assignment of variables also has its rules (and for all rebels reading this, these rules are NOT made to be broken), especially in regards to naming your variables:
  • RULE 1: Variable names cannot begin with numbers or symbols, letters only. Basically, you can’t have a variable named “2wo” or “$ign” or anything like that. Of course, variables can contain numbers and symbols, just not in the beginning.

  • RULE 2: There can be no spacing in variable names (i.e. nothing like “Number of People). If you want to name a variable that, it’s best to delete the blank spaces (NumberOfPeople) or use the infamous underscore (Number_Of_People_).
  • RULE 3: You can’t use a variable name that also happens to be a java keyword, e.g. if the word “String” is a keyword, you can’t make the variable name “String”. You could call it “FirstString” though.
  • RULE 4: Variable names are very case sensitive i.e. “FirstString” and “firstString” are two completely different variables. Also if you make the mistake of typing “FistString” when assigning the variable, then you type “FirstString” later in the code, it will give an error.
  • RULE 5: This isn’t actually a rule, since you don’t have to do this, but in respect to rule 2, it’s common practice to start the first word with a small letter and the second with capital e.g. “firstString” instead of “FirstString”. Again, they’re both correct, but the first one is just better programming practice.

Now let’s look at some basic data types.


Launch NetBeans, and open the TutorialProject file from the last tutorial. Without deleting the code, we wrote last time, type in this:

Now, the ‘int’ there is an integer which is a data type that stores whole numbers. To assign a number, go to the next line and type this.

int firstNumber;

        firstNumber = 20;

Or, you could directly assign the variable like this:

int firstNumber = 20;

You’ll see a grey line under the variable name. This isn’t an error message, so don’t worry, it’s just the system remind you that you haven’t called your variable. Place your cursor over the line and you should see the message. If the line just disturbs, don’t worry, we’ll remedy that in a second.
If you hadn’t deleted the print line we made, delete the “Hello World” and type in “firstNumber”, this time without quotes (because this time it’s actually code). If you run it, you will most definitely see this.

Change the number in the code and try it out, you’ll definitely see the exact same number. Now let’s try something a bit different, change your ‘println’ statement to this:
System.out.println(“The first number is” + firstNumber);

The plus means you should join the message in quotes to the value stored in the variable. This is known in programming as a concatenation.
Run your programme and look at the output. Can you see what’s wrong?

You guessed it! There’s no space between the ‘is’ and the ‘20’. This is because the quotation marks read the message as a string, including the spaces. To fix this, put a space after the ‘is’ in the code, so that it’ll look like this:
System.out.println(“The first number is ” + firstNumber);
Run it, and it should look much better.
Now a variable is just a memory space, so it has a limit to what can be assigned to it. An integer value, for example, can only take numbers between −2147483648 and 2147483648. If you want values larger or smaller than that, you can use the double variable.


Doubles store much larger values than integers with the maximum and minimum at 17 with about 307 zeroes. It is also used to store floating point values (floating point is a fancy word for decimal value) e.g. 8.2, 3.12, 41.5, etc.
Let’s see them at work. Under the integer variable you’ve made, type this down:
double firstDouble = 20.8;
Then in the print function, change “firstNumber” to “firstDouble” and run it:
If you’re curious as to what happens if you put a decimal value in an integer, add .8 to the 20 in the integer variable and put it in the print statement, or better yet, change the double variable to int. Then just run it. You should see an error, and then you’ll know what happens.


These are very similar with doubles, since they also store floating point values (as their name implies). The main difference between the two is that the double has more memory space than the float, and so can store more values (the Double is 64 bits while the Float is 32 bits).
Another difference is the way values are assigned in Floats. Besides the change in data type name (from double to float), there is also an addition of the letter ‘f’ to the back of the value, i.e.
float firstFloat = 20.9f;
Type this in and run it. (It won’t show the f in the result). This should be your output:

Try removing the f and see what happens.
There are other data types like short, long, Boolean, string, char, etc. but for the purpose of this tutorial, we’ll stick with these three. The others will be brought forth and explained as time comes.


Now in the world today, a world of games and social media and entertainment and artificial intelligence, we sometimes forget what computers actually are: oversized calculators! It sounds weird but it’s true. The original computers were built to perform basic calculations, and it’s actually through these calculations that computers have achieved what they could achieve today. You can actually perform any conceivable calculation on your computer, it just depends on if you can speak the computers language.
Fortunately, that’s why we’re here.
Now delete everything except the original integer variable and the print statement. Then add this:
int secondNumber = 28;
int answer = firstNumber + secondNumber;
System.out.println(“The sum total is ” + answer);
Now what we’ve done is store two numbers into two separate variables and tell the system to add them together (+ is the operator for addition). The system then prints out the sum total with the message in quotes. If you run it, we should get this:
If you don’t, either your codes wrong, or your computer just doesn’t know math. (That’s what you get when you by a computer from a guy in a street corner).
You can also add numbers directly into the variable. Add the figure 17 to your variable answer, so that it looks like this.
int answer = firstNumber + secondNumber + 17;
Run it and you should get 65. If you don’t, make sure you get you get your money back from street corner guy!
The other arithmetic operators include minus sign (-) for subtraction, asterisk (*) for multiplication, and backward slash (/) for division. Try them out in your code for fun. You don’t even have to confine yourself to only two variables. Make more and more, and even experiment with double and float.

Next week, we’ll continue on variables, and treat more variable types. We’ll also be sure to do more coding practice.
And speaking of practice, remember that you can only get better through it. It does make perfect.

Thanks for reading

Tuesday, February 27, 2018

2 Ways to swap the values program in java [with / without third variable]

Swapping 2 variables  is one of the most common interview question asked in java interviews , Its very simple if one will use the third element and store the value in it and swapped the problem.but the main thinking starts when the interviewer asked you to tell him who to swap without using 3rd variable . In this post we will see both approach .

Approach 1: By Using third variable
Pseudo Code
  • We will take third variable , initialize the third element with 0
  • Store second variable value in third variable and store first variable value in second variable
  • Now store third variable value in first element and the value swapped.


public class SwappingProgram {
 public static void main(String[] args) {
  int i =10 , j=15 ;
   System.out.println("Value of 'i' before swapping "+i+" value of 'j' before swapping "
//  first method of swaping the value is to use the third element
  int k =0;
//  storing in third variable and swapping values
   k = j;
   System.out.println("Value of 'i' after swapping "+i+" value of 'j' after swapping "


Approach 2 Without using third variable
Pseudo Code
  • In this case , we first add both values and store it in first element.
  • Now as first element is the sum of both we will sub the j element from sum we will get value of initial i and store it in j value.
  • As a the value of j is now is value of i but now we need to get the value of j in I , we will subtract I from j we will store it in I , now we will get the value of j


public class SwappingWithoutThirdVariable {
 public static void main(String[] args) {
  int i =-10 ,j=2;
   System.out.println("Value of 'i' before swapping "+i+" value of 'j' before swapping "
//   using adding and sub to swap the values 
  i = i+j;
   System.out.println("Value of 'i' after swapping "+i+" value of 'j' after swapping "


I hope this article will help you , if you like this article please share it with your friends and colleagues .

Thanks for reading

Sunday, February 25, 2018

Top Course for Data Structures and Algorithms in Java - Job Interview

Most of the People just aware about data structure but when it comes to the in depth knowledge of Data structure , very few of the people stand up to mark.
Data structure itself is one of the most buzz field in the computer science industry and every one once in the life always read data structure either in their college life or while preparing for interview , but few of the people is having good in depth knowledge of data structure.

people things that data structure is very tough field , but believe me its one of the most interesting topic in computer science where actually engineers are solving the day to day problem of human being from creating algorithms and making life digital.

Let see how if you dont have good knowledge of data structure , you dont need to be worried there are some online courses which are very good on Udemy.

Before we go further you can also see some of the important course every developer should take.

lets go

1. If you are new to data structure and preparing for job interview below is good course.

Data Structure and Algorithms Analysis - Job Interview

By Hussein Al Rubaye

What you will get from this course
  • It is good for beginner , will cover from all the topic important for interview.
  • The Instructor will teach you all the topic and then give explain every datastrucure.
  • Will highlight all the interview related topics and interview questions can be asked.
  • Will clear your doubt and queries.
Topic Covered
  • Analysis algorithms like Sorting, Searching,  and Graph algorithms. 
  • how to reduce the code complexity from one Big-O  level to another level. 
  • Furthermore, you will learn different type of Data Structure for your code.
  • Also you will learn how to find Big-O for every data structure, 
  • how to apply  correct Data Structure to your problem in Java. 
  • how to analysis problems using Dynamic programming. 
  • code complexity in Different algorithms like Sorting algorithms ( Bubble, Merge, Heap, and quick sort) ,
  • searching algorithms ( Binary search, linear search, and Interpolation), 
  • Graph algorithms( Binary tree, DFS, BFS, Nearest Neighbor and Shortest path, Dijkstra's Algorithm, and A* Algorithm). 
  • Data Structure like Dynamic Array, Linked List, Stack, Queue, and Hash-Table
Note : This is one of the best course though the english of instructor is not native english man , you might fell difficulties.  

I hope this will help you to get the indepth knowledge of data structure ,and will help you land to dream job.

If you like this aricle please share it with your friend and colleagues.

Thanks for reading

Saturday, February 24, 2018

Top 5 Courses for Java / Spring developers

Online Courses are now the new trend of learning things first and udemy is one of the site which takes the lead of the online courses . In this article we will see what all courses everyone who want to learn Java programming should enrolled.

Before we move further , You can also see one of the best spring course available on Udemy.

Let see the courses and there Scope what you will learn from these courses.


Course from Beginner of Java Programming :-

By Dheeru Mundluru

What you will learn from this course:
  • This is for complete beginner of java programming ( even experienced can also see)
  • He has explained everything in a very proper way so that you can even relate it with real examples.
  • Cover all the important topics even the most common interview questions asked 
  • All the source codes are also available in the course.
  • course is very cheap , Check now


If you are experienced Java Developer and want to learn the in depth understanding
my recommendation is

Complete Java Masterclass 

By Tim Buchalka

What you will learn from here
  • This will cover all the important topics along with java 8 and java 9 topics 
  • Will provide the indepth understanding of lambda expression and date API changes .
  • Will provide full support of all the doubts you have while taking course.
  • will provide the certificate after successful completion of the course
One Important thing is if you have no experience , you can even then this course as well .

3. Spring and Hibernate Leaning 

If you are looking for learning spring and hibernate you can take the below course and it is one of the best course to learn from scratch .

Spring & Hibernate for Beginners

By Chad Darby
Features of this course-
  • If you not at all familier with spring and hibernate , you should take this course.(only for begineers)
  • this will cover the spring from xml to annotation implementation along with hibernate from hibernate xml to hibernate annotations.
  • it will also provide the support of your doubts by chad darby itself 
  • the speed of the course is little fast but you can cover up with that.
  • After successfully complete the course you will get the certificate of completion by udemy itself.
Note: If you are already aware of the spring and hibernate then you should take this course

4. Course for Android Developers

If you guys are looking for some good online course where you can learn android from scratch , below is the course you should avail.

The Complete Android N Developer Course

By Rob Percival
Features of this course 
  • you will get some free stuff like 50$ of AWS Credits , Free 1 year of hosting and much more
  • It will teach you and will create complete new apps which will host on AWS and will show you all the features you can use.
  • It is one of the best course for beginner of android developers.
  • successfully completing will also provide you the certificates.

5. Want to be a Kotlin Android  Devloper 

The Complete Android Kotlin Developer Course

By Hussein Al Rubaye

Features of this courses.
  • You will be learning basics of kotlin language.
  • You will develop an app from scratch and upload it in google play store.
  • you will get the certificate of completion .

I hope all the courses will help you in becoming a good programmer , if you like the article please share it with your friends and collegues 

Thanks for reading 

Friday, February 23, 2018

Introduction to Java Programming

Hello again. Welcome back to another one of our hopefully really good articles on Java programming. If you’re reading this, then I’m assuming you read the last post on installing java software (if you haven’t, you can do so by clicking the link here). If you have read the last post, then by now you should have successfully installed the Java Runtime Environment, the Java Development Kit and the NetBeans IDE software.
(N.B.: The majority of these tutorials will be done using NetBeans, but those using other IDEs like Eclipse are also free to follow through).
This week, we’re going to take a quick look at the NetBeans environment, explain how coding in Java works, and at the end, we’ll run our first piece of code.
So let’s start learning.

Before go ahead see the last articles 
  1. Making Games With Java- Introduction
  2. Getting Everything you need for Java


I want to believe that all those reading this have successfully downloaded and installed everything we mention in the last post. If you want to make sure that the JRE has been installed, or you want to know the directory that it is saved into (I don’t know, maybe you’re just curious), what you can probably do is access the JAVA_HOME environment variable.
In case this is new to you, an environment variable is a string variable (we’ll talk about string variables in a later post) that stores information like the drive, path or name of a particular file. Now, what the JAVA_HOME variable does is point to the directory where your JRE is saved.
To access this, all you have to do is open the Control Panel, access your system settings, and look for “Advanced System Settings”. This should open the following dialog box:

Click on “Environment Variables”, and you should see the JAVA_HOME variable in the new dialog box, under the “System Variables” tab. In fact, if you double-click it, you will see a dialog box that will allow you to change the variable name and directory.
Now let’s move on.

How Java Coding Works

Traditionally, java code (and all code for that matter) is written using a text editor (NetBeans, and most IDEs, comes with a special area for writing code. The source code (or code written by you) is saved with the extension “.java”, and the compiler (a program known as Javac) then converts the source code into machine code (1s and 0s), in a process known as Compiling.
When the compiling process is over, and if there are no errors, Javac creates a new file with a “.class” extension, which is then run by the Java Virtual Machine.
NetBeans takes care of all of this for you, creating the files, compiling the source code, and running these programs in its own software, thereby saving you the trouble of writing long strings of code in a console window. (Aren’t IDEs great?)
Now that you know the basics of coding, time to start your engines! (By that, I mean run the NetBeans, or whatever it is you’re using).

When you launch the software, it should look something like this:

It’ll take a little while to load though, so maybe you can play a quick game of Minesweepers while you wait. Or, I don’t know…

To open the coding window, go to “File > New Project” or click the keyboard shortcut “Ctrl-Shift-N”. You could also look under the toolbar for this symbol
. Whatever you do, you’ll see this dialog box.

Since we’ll be making a Java application, select “Java” under Categories, then under Projects, select “Java Application”, like was mentioned before. You’ll then see this dialog box:

Yeah, I know; so many dialog boxes, right! Don’t worry, this is the last one. Type in the project name in, well, the Project Name text box (it’s actually quite self-explanatory). Let the name be TutorialProject (with no space). You’ll notice what happens in the text area next to the “Create Main Class” checkbox (make sure this is checked by the way; I’ll explain why later). As you write “TutorialProject” in the Project Name text box, the same will appear in the second text box, but this time with lowercase. In simple terms, it will generate something like this:


The “TutorialProject” with upper case is the name of the class file created by the IDE, while the one in lower case is the name of the package it is contained in. You can set the default location of your java project in “Project Location” or you can leave it at the default (NetBeans will create a folder with the projects name) and when you’re satisfied, click “Finish”.

You should almost instantly be taken to the coding window, which should look a lot like this:

Now, if you would please direct your attention to the left of this, you should notice this window:

Your “Project” window would most likely be mostly empty (save for the TutorialProject) since the software is newly installed. Click the plus by the little coffee mug and you’ll see this:
Click the plus by the Source Packages, and you’ll see the package name (which is the same as your project name). Expand that and you’ll see the java source file:
But enough of all the software stuff, let’s take a look at some java code.

A Look at some code

Now when you look at the coding window, you’ll probably notice some lines of code written there. You’ll see some words in blue, some in black and some that are greyed out, and you seem kind of overwhelmed. It’s kind of like standing in a glass museum; everything looks beautiful and new, but you’re afraid to touch anything, because doing so might wreck the entire thing.
Don’t get me wrong, this is quite true. But don’t worry, that’s why I’m here. To walk you through this complicated minefield we call Java.
Now first off all…


…you’ll probably notice some words that are greyed out in the code. You also notice that they have a lot of slashes and asterisks in them, and at first, they probably look like some sort of cool, complicated code that you shouldn’t mess around with.
But don’t be scared, these greyed out lines are called comments, and they’re relatively useless. In fact, I could delete all of them right now, like so:

Ta da! No consequences! And the code looks a lot less complicated too!
Now, I’m sure you’re wondering right now “Wait, if those things aren’t. Say, you just wrote this mad 300-line code for, like, a game or something, and then feeling proud of yourself, you close your system and go to sleep. The next day, you want to show it off to your fellow coding buddy, and he (also impressed) asks you what something does. You open your mouth, about to tell him what is obviously painstakingly obvious…
But you can’t tell him anything. You code is long and complex, you can’t remember what anything does. And now, you can’t tweak it, because you’re too afraid to touch it, because you have no idea what anything does.
Sad, but true.
Now, you can prevent this with comments. These greyed out lines are very useful in describing what each part of the code is used for. The best thing is, the compiler completely ignores them when run, so you can write anything you want. I prefer to delete the comments that NetBeans generates, but you can leave them if you want.
To create a comment, simply start whatever you want with two forward slashes, e.g.:
//This is a comment
But this will only last for one line. If you want to comment out more than one line, you could do this:
//This is a comment
//This is another comment
Or, even simpler and more efficient, start the line you wish to comment with a forward slash and two asterisks, and end it with an asterisk and forward slash, i.e.:
/** This is a
Multiline comment


If you removed the comments, the first thing you would see is this line:
package tutorialproject;
This is just the name of the java package you created. Note the semicolon at the end. It’s quite necessary to end all lines of code with a semicolon, or else it won’t work. Also, it’s not compulsory for the package name to be the same as the project name, or class name. If you had renamed it while creating the project earlier, it wouldn’t really matter.
The next thing would be:
public class TutorialProject {
This is the name of the class file created while compiling. You can think of it as the area where code is written, with the curly brackets ({}) defining the borders of this area. Any code run outside these curly brackets will not be run with the remaining code, and will most likely generate an error message.
Looking in the curly brackets now, you’ll see this:
  public static void main (String[ ] args ) {
And it comes with its own curly brackets too (the same conditions apply). This is called the main method (hence the name “main”). Never mind what a method is now; we’ll talk about that in a later post. Just think of it now as a chunk of code, and the main method is the chunk of the code that the compiler runs first. You’ll likely receive error messages if there is no main method, and for now, this is where you’ll input most of your code.
(Don’t worry about all those words like “static” and “public” and those stuff in the bracket, we’ll explain those when we explain methods).
Now before we round off, it’s only fair that we run at least one code.


What we’re going to do is print out something to the console window. Quick, add this in between the curly brackets of your main method:
System.out.println(“Hello World”);
When you type in System and put the dot, this happens:

Double click the “out” option and type a dot; the this will happen:

Double click “println” and a bracket will also appear with the statement. In the bracket, put quotation marks and type “Hello World”, then outside the brackets, put a semicolon (always remember the semicolon. It will save you a lot of sleepless nights as you advance as a programmer).
At the end, your code should look like this:


Okay, so what this is going to do is print out “Hello World” into the system console. The word “System” is the keyword which calls the console out. The keyword “out”, well, think of it as short for output. And “println”, obviously enough, is the keyword which tells the system to print whatever you want. (Keep in mind, “ln” is small letter ‘L’ and n, not capital letter ‘I’ and ‘n’).

After the println, there’s a bracket, with “Hello World” in quotation marks. It is very important to put it in quotes, because if not, the computer will mistake the output for code, and there will be an error. Watch what happens when I remove the quotes:

You notice that red line? Yeah, that means there’s an error.
In short, you’re saying “Computer, print out whatever I put in that bracket, which is “Hello World”. You can put anything you want in the quotes. It will print out!
Now let’s run this thing. There’s a number of ways to do so. One is to right click on the window and click “Run File” from the pop-up window that pops up. Another way is to click this symbol on the toolbar, or you could go to the Run menu and click Run. Or, if you prefer keyboard shortcuts, click F6 or Shift-F6.
Either way, when you run it, you’ll notice some processes taking place, and this will pop-up with your message:

If you see this, then congrats! You’ve just run your first successful java code.

See you next post, where we’ll most likely be discussing variables and data structure.

If you have any other issue , let us know or if you like the article please share it with your friends and colleagues

Thanks for Reading 

Getting Everything you need for Java

If you read the last post, then I’d like to start by welcoming you back. I’d also like to congratulate you for choosing to continue down this fun, yellow-brick road that is Java programming. Believe me when I say that once you go down this road, there’ll be no turning back. I mean, there’ll be many opportunities for you to turn back, but you’ll never want to.
In Java programming, you’ll learn how to make amazing things; and you can feel a lot smarter than your friends who can’t code. And as a bonus, you might even lose all hopes of a social life, and spend all you free time, hunched over your computer, typing away day and night while your life passes you by. In fact, you could have many sleepless nights, your bloodshot eyes glued to the screen, trying to figure out how a fix a code that you wrote but don’t fully understand. And then even if you want to stop, you won’t be able to, and you’ll realised that you’ve sold your soul to the code… forever!
Trust me, it’ll be fun.

Let’s Get Started

Now before you start writing code, the first thing you have to worry about is getting everything you need to actually start writing code. There are lot of important files and programs that you’ll need before your Java code can actually, and these things can be hard to keep track of and download, due to their size. And thanks to the internet, there are lot of websites that provide these files for download, and hard to be sure which one is authentic.
Basically, your problems start before you even start writing code.
So I’m going make all our lives easier by outlining the best place to get everything you need to code in Java.
The first thing you’ll need to write Java code is a place to actually write Java code. You can choose to do this using a basic text editor with no formatting properties like Notepad, to do this. That is, if you love to stress yourself, since to run and debug code on a text editor would take a long process. There are text editors, like Sublime Text and Notepad++, that are designed mainly for programming use; but the best thing to do, as a beginner, and even an expert programmer, is to use an IDE.

Whoa… what’s an IDE?

An Integrated Development Environment (or IDE for short), is an application software that allows the programmer to run, debug and test programs with convenience. Using an IDE makes life easier, really, since running code on it takes a fraction of the time used running code without one.
With so many programming languages around, there are also a lot of IDEs existing. Some of them already come with inbuilt compilers, while others require that you download the compilers separately. There are a lot of IDEs that are created specifically for Java programming, like Eclipse, IntelliJ and NetBeans.
For the purpose of these tutorial though, we’ll use NetBeans. It’s the most popular piece of programming software, it’s arguably one of the best, and the best part is… it’s free. And we all over things that are free. You’ll see what it looks like in a second, but before we can get it to actually run code, we’ll need to get some important Java components.

The first one we’ll look at is the Java Virtual Machine.

The Java Virtual Machine
If you had read the last post, then you’ll probably remember when I said that Java was platform independent. If you didn’t, well than now you know. To recap, this means that Java can run on any operating system, be it Windows, Linux or Mac OS (take that Apple!). The reason for this miracle is the Java Virtual Machine (also the Java Runtime Environment(JRE)), which is a separate platform that runs all Java code independently, regardless of OS. This is a very component to run code, and it should be your download priority if you ever wish to code in Java.
Java is owned by Sun Microsystems, and so to download it, you’ll need to go to their website. To do so, use this link:
Which should take you a webpage that looks like this:

Under the giant red “Free Java Download” button is a link that says “Do I have Java?”, click on this if you want to be sure that you have the JRE. If not, then you will be given the website will give you the opportunity to get it.
After the download and installation, you might need to restart your system. By the time your system is done booting, you’ll have successfully installed the Java Virtual Machine.

The Java Software Development Kit

At long last, we have the treasure JRE/JVM (whatever you prefer to use). Now we can write all the codes we want, right? Right? Well, actually, you would be wrong. You see, the virtual machine only allows you to run code, but it doesn’t provide the mean to actually write it. To do this you need something called the Software Development Kit.
Luckily, Java has a specialized Software Development Kit (which is conveniently called the Java Software Development Kit, or JDK for short). Now if you wish to download it, simply click the below link:
…which should take you to the webpage below:

What we need to get is the Java SE (Standard Edition). The latest update is Java SE9, but I would recommend Java SE 8, since that’s what I’m using, and I’m not sure what new features have been added. You can click “Java SE” under “Top Downloads”, or just go to “New Downloads and pick your choice.
If you picked Java SE 8 (though I’m sure it’s most likely the same with the other options), you should be taken to the following page:
Since we’re going to be using NetBeans, proceed to click the link that says “NetBeans with JDK 8” or whatever it says based on which JDK you picked.
And is it finally over? Do I have the fabled NetBeans and JDK? Do I finally have everything I need to be a mad-ass Java expert?
Unfortunately, no. Well, not yet anyway. See, after clicking that link, you should be taken a page where you will be required to pick the JDK based on your operating system (Don’t worry. This won’t affect the platform independence of Java). After this, you should finally be able to download the JDK.

Now that that’s over…

Before you wipe the sweat off your face and pat yourself in the back, keep in mind that the JDK costs over 200 megabytes, and so will be a pain to download (especially if you’re on really slow internet). Since it’ll also take quite a while to install everything, I might as well end here. I’m sure by the next post, you would have successfully installed the NetBeans Software, and you would finally be able to write and run Java programs.
Next week, I’ll be discussing the NetBeans Software and you’ll finally take your baby steps and write your first piece of Java code. Before then, you could try getting familiar with the software. Play around with some, and try to understand how some things work. Don’t worry about messing anything up, that’s how you learn.

I hope you like the post , if you have any issue please leave us a comment .

Thanks for reading