Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. public static boolean method1(int n)
  2. {
  3.     System.out.println("Calling method 1");
  4.     return n<10;
  5. }
  6.  
  7. public static boolean method2(int n)
  8. {
  9.     System.out.println("Calling method 2");
  10.     return n<10;
  11. }
  12.  
  13. //Used code below; what's the resulting printed statements?
  14.  
  15. for(int n=0;n<11;n++)
  16. {
  17.     if(method1(n) || method2(n))
  18.         System.out.println();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement