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 Output {
  9.  
  10. public static void main(String[] args) {
  11. Output o = new Output();
  12. o.go();
  13. }
  14. void go() {
  15. int y = 7;
  16. for (int x = 1; x < 8; x++ ) {
  17. y++;
  18. System.out.print("debug: y =" + y + " x= "+x+"\n");
  19. if (x > 4) {
  20. System.out.print(++y + " ");
  21. }
  22. if (y > 14) {
  23. System.out.println(" x = " + x);
  24. break;
  25.  
  26. }
  27. }
  28. }
  29. }
Success #stdin #stdout 0.08s 2184192KB
stdin
Standard input is empty
stdout
debug: y =8 x= 1
debug: y =9 x= 2
debug: y =10 x= 3
debug: y =11 x= 4
debug: y =12 x= 5
13 debug: y =14 x= 6
15  x = 6