fork download
  1. import java.util.Scanner;
  2.  
  3. public class App{
  4. public static void main(String[] args){
  5.  
  6. Scanner input = new Scanner(System.in);
  7.  
  8. System.out.println("Enter your name.");
  9.  
  10. String name = input.nextLine();
  11.  
  12. System.out.println("Nice to meet you, " + name);
  13.  
  14. }
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:3: error: class App is public, should be declared in a file named App.java
public class App{
       ^
1 error
stdout
Standard output is empty