fork download
  1. import java.io.*;
  2.  
  3. public class inputoutput{
  4.  
  5. public static void main(String[] args)throws IOException
  6. {
  7. String str;
  8. int a;
  9. System.out.println("enter a number");
  10. str=br.readLine();
  11. a=Integer.parseInt(str);
  12. System.out.println("result ="+a);
  13. }
  14. }
  15.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:3: error: class inputoutput is public, should be declared in a file named inputoutput.java
public class inputoutput{
       ^
1 error
stdout
Standard output is empty