SHARE
TWEET

Untitled

a guest Feb 17th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MyApplication{
  2.  
  3.     public static void main(String[] arguments){
  4.         System.out.println("Hello World!");
  5.     }
  6. }
  7.    
  8. javac MyApplication.java  //this will compile it
  9. java MyApplication  //this will run the main method of MyApplication
  10.    
  11. java MyApplication some_file.txt // Run application with one arg.
  12.    
  13. public class MyApplication{
  14.  
  15.     public static void main(String[] arguments){
  16.         System.out.println("Hello World!");
  17.         System.out.println("You entered: " + arguments[0]);
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top