Java Introduction

Java programming language are very easy to learn .

More than 3 billion devices run Java.
Java is used to develop apps for Google's Android OS, various Desktop Applications, such as media players, antivirus programs, Web Applications, Enterprise Applications (i.e. banking), and many more!

The main Method

the main method must be identical to this signature:
public static void main(String[ ] args)
public: anyone can access it
- static: method can be run without creating an instance of the class containing the main method
- void: method doesn't return any value
- main: the name of the method


Inside the main() method, we can use the println() method to print a line of text to the screen:


   System.out.println("Hello World!");

The println method prints a line of text to the screen.
The System class and its out stream are used to access the println method.

Semicolons in Java

class MyClass {
  public static void main(String[ ] args) {
    System.out.println("I am learning Java");
Try it yourself ยป

Each code statement must end with a semicolon.