Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class Foo{
  2.  
  3. public static void main(String[] args){
  4. Bar myInstance = new Bar();
  5. myInstance.M1();
  6.  
  7. }
  8. }
  9.  
  10. class Bar{
  11.  
  12. public M1() {
  13. // do something
  14. System.out.println(“Hey! Someone called me! I’m here!”)
  15. M2();
  16. }
  17.  
  18. public M2() {
  19. System.out.println(“Hey! Someone called me! I’m here!”)
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement