fork download
  1. String userInput;
  2. while (userInput = null) {
  3. System.out.println("");
  4. System.out.println(" Enter type: ";
  5. System.out.println(userInput);
  6. userInput = "fred";
  7. System.out.println(userInput);
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: class, interface, or enum expected
String userInput;
^
Main.java:2: class, interface, or enum expected
while (userInput = null) {
^
Main.java:4: class, interface, or enum expected
System.out.println(" Enter type: ";
^
Main.java:5: class, interface, or enum expected
System.out.println(userInput);
^
Main.java:6: class, interface, or enum expected
userInput = "fred";
^
Main.java:7: class, interface, or enum expected
System.out.println(userInput);
^
Main.java:8: class, interface, or enum expected
}
^
7 errors
stdout
Standard output is empty