Monday, May 16, 2022

To Learn Java

Java

Hello World!


This is the start for learning Java. Like any other writer I'm not going to explain about the language.
you can find anything about java searching on internet. I'm going to give you a simple way to catch the language.

  • Tip
    • Don't copy and paste try to type all by yourself it will help you to remember the keywords.


class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World!");
}
}

This is the simple first Java example. I'll explain this small program.

Any of Java program is a "class" or collection of it. don't think about the object oriented.
Java is a object oriented language, but now don't think too much.


  • Exercise 1

class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World!");
}
}

Type this small program in notepad or any other simple text editor and save it as HelloWorld.java
The file extension should be '".java" and select file type as All files.

  • Tip
    • Remember Java is a Case Sensitive language you should be careful to use the correct case