fork download
  1.  
  2. public static void main(String[] args)
  3. {
  4. double x=0;
  5. while (x<1){
  6. x=x + 1/2;
  7. System.out.println(x);
  8.  
  9. }
  10.  
  11.  
  12.  
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:2: error: class, interface, or enum expected
	public static void main(String[] args) 
	              ^
Main.java:5: error: class, interface, or enum expected
		while (x<1){
		^
Main.java:7: error: class, interface, or enum expected
			System.out.println(x);
			^
Main.java:9: error: class, interface, or enum expected
		}
		^
4 errors
stdout
Standard output is empty