fork(1) 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. System.out.println("Punto 1:\n\n");
  13. int x = 1;
  14. if (true) {
  15. System.out.print(" Hola mundo ");
  16. x+=3;
  17. } else if ( x > 1 ) {
  18. System.out.println(" cruel ");
  19. }
  20.  
  21. System.out.println("\n\nPunto 2:\n\n");
  22. int x1 = 1;
  23. if (true) {
  24. System.out.print(" Hola mundo ");
  25. x1+=3;
  26. } if ( x1 > 1 ) {
  27. System.out.println("cruel");
  28. }
  29. }
  30. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
Punto 1:


 Hola mundo 

Punto 2:


 Hola mundo cruel