when i insert the code to read input form commandline in my program, i get the errors:
1.class BufferedReader not found;
2.class InputStreamReader not found
Why is it that?
What should I do?
Here`s the code
--------------------------------------------------
import java.io.*;
//some code
System.out.print("Enter a word: "
// open up standard input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String userName = null;
try {
userName = br.readLine();
} catch (IOException ioe) {
System.out.println("IO error trying to read the input!"
System.exit(1);
}
}
-----------------------------------------------
1.class BufferedReader not found;
2.class InputStreamReader not found
Why is it that?
What should I do?
Here`s the code
--------------------------------------------------
import java.io.*;
//some code
System.out.print("Enter a word: "
// open up standard input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String userName = null;
try {
userName = br.readLine();
} catch (IOException ioe) {
System.out.println("IO error trying to read the input!"
System.exit(1);
}
}
-----------------------------------------------