fork download
  1. class MyMethod
  2. {
  3. static int func1()
  4. {
  5. System.out.println("Inside Func1");
  6. return 10;
  7. }
  8. static int func2()
  9. {
  10. System.out.println("Inside Func2");
  11. return func1();
  12. }
  13. static int func3()
  14. {
  15. System.out.println("Inside Func3");
  16. return func1()+func2();
  17. }
  18. public static void main(String[] args)
  19. {
  20.  
  21. System.out.println(func3());
  22. }
  23. }
  24.  
Success #stdin #stdout 0.1s 320512KB
stdin
Standard input is empty
stdout
Inside Func3
Inside Func1
Inside Func2
Inside Func1
20