Java Applications


About Java Applications
  • must have one and only one class that has a main() method.
    • public static void main(String args[]) {...}
  • This main method gets executed when the interpreter is invoked with the parameter of the classname passed to it.
  • Typically, the class with the main object will share its name with the filename
  • Pass parameters to a Java application through the args[] of the main() method.
  • How to pass parameters:
    • java applicationname arg0 arg1 arg2
© Lynne Grewe