Advertisement
iocoder

Untitled

Sep 23rd, 2012
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. 1- Create a Helloworld.java file and edit it:
  2. $ nano Helloworld.java
  3. (you may use any other text editor)
  4.  
  5. 2- Enter this code:
  6.  
  7. public class Helloworld {
  8. public static void main(String[] arg) {
  9. System.out.println("Hello World!");
  10. }
  11. }
  12.  
  13. 3- Write the file and quit nano.
  14.  
  15. 4- Compile it:
  16. $ javac Helloworld.java
  17.  
  18. 5- Run it:
  19. $ java -cp . Helloworld
  20. Expected Output:
  21. Hello World!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement