Lecture 3
16
a:\> java Bank
•138  public static void main( String[] args )
•139  {
•140      Bank javaBank = new Bank(                           "Engulf and Devour" );
•141      javaBank.open();
•142  }
•
•Program starts at line 140 (first in Bank main method),                          creating a new Bank object
•Line 141 sends that Bank object a message asking it to open itself
•Execution jumps to the code in Bank’s open method
•When that method is done we’re at the end of main, program is done, control returns to shell (shell prompt)