fork download
  1. /* package whatever; // don't place package name! */
  2. import java.util.Scanner;
  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. int num1;
  10. num1 = numberInputReader.nextInt();
  11. System.out.println( "My name Is " + num1 );
  12. num1 = num1 - 1;
  13. system.out.println( "And the number minus 1 is " + num1 );
  14. }
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
8
compilation info
Main.java:13: package system does not exist
     system.out.println( "And the number minus 1 is " + num1 );
           ^
1 error
stdout
Standard output is empty