Ad Code

Simplest Java code

 What is Java?

  • Java is a programming language and a platform.
  • Java is a high level, robust, object-oriented and secure programming language.
  • Java was developed by Sun Microsystems in the year 1995. 
  • James Gosling is known as the father of Java. 
  • Before Java, its previous name was Oak.
The first and simplest Java code is given below:

Program of printing Hello world



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

Printing Hello World by creating class itself 



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

Post a Comment

0 Comments

Ad Code