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. // the_world_is_flat = 1
  13. message = “Be careful not to fall off!
  14. try:
  15. if the_world_is_flat:
  16. print message
  17. except:
  18. print “the world is not flat”
  19. }
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:13: error: illegal character: '\u201c'
message = ?Be careful not to fall off!?
          ^
Main.java:13: error: ';' expected
message = ?Be careful not to fall off!?
                     ^
Main.java:13: error: ';' expected
message = ?Be careful not to fall off!?
                            ^
Main.java:13: error: ';' expected
message = ?Be careful not to fall off!?
                                     ^
Main.java:13: error: illegal character: '\u201d'
message = ?Be careful not to fall off!?
                                      ^
Main.java:14: error: '{' expected
try:
   ^
Main.java:14: error: ';' expected
try:
    ^
Main.java:16: error: not a statement
print message
^
Main.java:16: error: ';' expected
print message
     ^
Main.java:17: error: ';' expected
except:
      ^
Main.java:18: error: illegal character: '\u201c'
print ?the world is not flat?
      ^
Main.java:18: error: not a statement
print ?the world is not flat?
^
Main.java:18: error: ';' expected
print ?the world is not flat?
                ^
Main.java:18: error: ';' expected
print ?the world is not flat?
                       ^
Main.java:18: error: illegal character: '\u201d'
print ?the world is not flat?
                            ^
Main.java:18: error: not a statement
print ?the world is not flat?
                        ^
Main.java:14: error: 'try' without 'catch', 'finally' or resource declarations
try:
^
Main.java:20: error: reached end of file while parsing
}
 ^
18 errors
stdout
Standard output is empty