fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. int l = 6;
  14. int m = 3;
  15. if (l > 5)
  16. if (m > 5)
  17. System.out.println("Both l & m are greater than 5.");
  18. else
  19. System.out.println("l>5 & m<5");
  20. if (l > 5)
  21. {
  22. if (m > 5)
  23. System.out.println("Both l & m are greater than 5.");
  24. }
  25. else
  26. System.out.println("l<=5"); //We don’t know “m” yet at this point.
  27.  
  28. }
  29. }
Success #stdin #stdout 0.16s 2841600KB
stdin
Standard input is empty
stdout
l>5 & m<5