Guest User

Untitled

a guest
Jan 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public static void main(String[] args)
  2. {
  3. System.out.println("main() start");
  4.  
  5. // Call another method, pushing it onto the top of the call stack:
  6. doWork();
  7.  
  8. System.out.println("main() end");
  9. }
  10.  
  11. public static void doWork()
  12. {
  13. // doWork begins execution:
  14.  
  15. System.out.println("doWork() start");
  16.  
  17. // do stuff.
  18.  
  19. System.out.println("doWork() end");
  20.  
  21. // doWork ends execution, and is popped from the top of the stack.
  22. // The next item in the stack, main() is now at the top of the stack.
  23. // It is also the only item in the stack.
  24. }
Add Comment
Please, Sign In to add comment