fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.util.Scanner;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. // your code goes here
  14. Scanner scan = new Scanner(System.in);
  15.  
  16. // Read a full line of input from stdin and save it to our variable, inputString.
  17. String inputString = scan.nextLine();
  18.  
  19. // Close the scanner object, because we've finished reading
  20. // all of the input from stdin needed for this challenge.
  21. scan.close();
  22.  
  23. // Print a string literal saying "Hello, World." to stdout.
  24. System.out.println("Hello, World.");
  25.  
  26. //System.out.println("Welcome to 30 Days of Code!");
  27. }
  28. }
Runtime error #stdin #stdout #stderr 0.14s 35308KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.util.NoSuchElementException: No line found
	at java.base/java.util.Scanner.nextLine(Scanner.java:1651)
	at Ideone.main(Main.java:17)