Write a java program which show Hello world!

Category : Java | Sub Category : The Genesis of Java | By Prasad Bonam Last updated: 2020-09-27 04:24:31 Viewed : 561


Write a java program which show Hello world!

Write a java program which show Hello world!


Example:  Save file name as HelloWorldApp.java

 

 /*

 * * Write a java program which show Hello World!

 */

public class HelloWorldApp { // this line declare a class name and class definition starts from here

 

     public static void main(String args[]) { // line where program main function starts

 

         System.out.print(" Hello World! "); // this line prints Hello World!

     } // at this line program main funcation ends

// program  class end

 

 


Run Program:  > javac HelloWorldApp.java

                           > java HellowWorld

Output: Hello World


Search
Related Articles

Leave a Comment: