Creating Hello World! In Java

Posted on



Creating Hello World! In Java

Steps:



1) Download & Install Java



2) Download & Install An Java IDE (Integrated Development Environment) (I Use Eclipse Ide)



3) Create Java Project



4) Use This Code:

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

Exit fullscreen mode



Explanation:

   class helloworld{
   }
Enter fullscreen mode

Exit fullscreen mode

defines a class named helloworld

  public static void main(String[] args){
  }
Enter fullscreen mode

Exit fullscreen mode

Main Java Code Goes Here.

   System.out.println("Hello World!");
Enter fullscreen mode

Exit fullscreen mode

Prints “Hello World!” in java console.

Remember: Don’t Forget To End

 System.out.println("Hello World!")
Enter fullscreen mode

Exit fullscreen mode

with a semicolon (;) to prevent an error.

Here we go! we have a hello world project in java!

Leave a Reply

Your email address will not be published. Required fields are marked *