This is a very Beginner Level Learn Java tutorials. If you have no knowledge of java and you’ve just studied it one time during your university and now you’ve totally forgot about it then this tutorial is for you. It is also for those who have no idea about java and want to start working on it.
Learn Java Tutorial Series Contents:
- Lecture 1: Learn Java (Current Lecture)
- Lecture 2: Learn Java: Variables
- Lecture 3: Learn Java: Strings
- Lecture 4: Learn Java: Loops
- Lecture 5: Learn Java: Conditions
Download Java IDE:
Eclipse is the best IDE to learn java. Open this like to download eclipse for java and download Eclipse IDE for Java Developers not Java EE, at least no at the moment.
I’ll be using in on mac. But if you are from another OS you’ll get the download link for that.
After this open this link: https://jdk8.java.net/download.html and download both JRE and JDK. Make sure you know the platform you are using is either 32-bit or 64-bit download accordingly.
Finally run eclipse! And you’ll get this IDE:
Learn Java: Getting started with Java in Eclipse
On the start up screen of eclipse click on create a new java project:
Give it a name and click finish.
Here is the project windows where you’ll write all of you code make classes and do all sort of stuff.
Creating your first class in Java:
Right click on project > new > Class
Give you class a name. I’m calling it HelloWorld and make sure you check the Public static void main. This is required but not necessary it depends on the requirement of a class. So for now just check this box and make sure your dialogues matches the one in the image below.
You can see you file and now you are ready to code.
After the //TODO line add:
Run it by pressing the green play button and you can see the output printed out in the bottom.