fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. /* The class name doesn't have to be Main, as long as the class is not public. */
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. Scanner numberInputReader = new Scanner(system.in);
  9.  
  10. int num1;
  11.  
  12. num = numberInputReader.nextInt( );
  13.  
  14. num1 = num1 - 1;
  15.  
  16.  
  17. System.out.println( "And the number minus 1 is " + num1 );
  18.  
  19.  
  20.  
  21.  
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:17: reached end of file while parsing
System.out.println( "And the number minus 1 is " + num1 );
                                                          ^
1 error
stdout
Standard output is empty