fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. class Test
  4. {
  5.  
  6. void display()
  7. {
  8. // calling function show()
  9. this.show();
  10.  
  11. System.out.println("Inside display function");
  12. }
  13.  
  14. void show()
  15. {
  16. System.out.println("Inside show function");
  17. }
  18.  
  19. public static void main(String args[])
  20. {
  21. Test t1 = new Test();
  22. t1.display();
  23. }
  24. }
Success #stdin #stdout 0.1s 54644KB
stdin
1
2
10
42
11
stdout
Inside show function
Inside display function