JAVA Syntax

class ClassName
{
    public static void main(String []args)
    {
        System.out.println("Learn2Done");
    }
}

Explanation of above syntax:

class:-class is a kind of template or blueprint of the object.The line ClassName means that here we create  a new class and its name is ClassName.

public static void main(String [] args):-Here is the beginning of the main method. A method is a behaviour , or the sequence of commands that allows you to perform an operation in a program.

Void main(): Void  is the return type of the method . main represents the starting point of the program.This is the name of the method. 

System.out.println(“Learn2done”):-Here we are using  this line because we want to take a print of any things .so ,thats  we are  using this  System.out.println(“”); line and write in double  qoutes  and showing  the output in our screen.