fork download
  1. /* package whatever; // don't place package name! */
  2. import java.util.Scanner;
  3.  
  4. /* The class name doesn't have to be Main, as long as the class is not public. */
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Scanner numberInputReader = new Scanner(System.in);
  10. int num1;
  11. int num2;
  12. num1 = numberInputReader.nextInt();
  13. System.out.println( "The answer to life the universe and everything is " + num1 );
  14. num1 = num1 -1;
  15. System..out.println( "And,the answer to life the universe and everything minus one is " + num1 );
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
42
compilation info
Main.java:15: malformed floating point literal
    System..out.println( "And,the answer to life the universe and everything minus one is " + num1 );
          ^
Main.java:15: not a statement
    System..out.println( "And,the answer to life the universe and everything minus one is " + num1 );
    ^
2 errors
stdout
Standard output is empty