Tuesday, 19 January 2016

How to write Simple HELLO Program in Java?

This is Simple Java Program


PROGRAM:

        1. class Simple{  
        2.     public static void main(String args[]){  
        3.      System.out.println("Hello Java");  
        4.     }  
        5. }  


OUTPUT:

Hello Java

Process:

Use NetbansIDE or EclipseIDE and run Program.

Another is

1. Open Notepad Write code
2. Save file as hello.java
3. open CMD(Command Prompt) 
4. type cd\ and click enter
5. type javac hello.java and click enter
6. type java hello and click enter
7. you will see the output on CMD

 

Thank you




 





No comments:

Post a Comment