JAVA Basic Programs -- Hello World in Java








This is your first java program, simply write in any editor and save your code with finename.java and after saving program compile using javac tool and run by using java tool.

















Xample: 


File_name: Helloworld.java


For Compiling: javac helloworld.java



For Execution: java Helloworld


Remember filename and class name must be the same


Xample:



class Helloworld

{

  public static void main(String[] args)

  {

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

  }

}





System.out.println("....."): are used for display message on screen or console.



Output:



Hello World!





That's it, I hope it is useful.



Thanks For reading. 

Comments

Popular posts from this blog

Android App Version Update using the following cordova cli commands

75 inspirational quotes that will change your life

Retrieval Image From DataBase and Display on WebPage by Using Servlets.