Hi,
Would anyone know why Console.readInt() ,or Console.read in general, won't work on my laptop . It works fine for me in college but never on my own laptop. Would appreciate help from anyone because have an assignment which needs it and want to do it from home.
Thanks,
Nailer91.
2 replies to this topic
#1
Posted 27 November 2011 - 05:55 AM
|
|
|
#2
Posted 27 November 2011 - 07:48 AM
Not every Java program you run is guaranteed to have a console. If I start the program from my IDE it won't, if I start the program from the command line I do.
Simply use a Scanner or bufferedReader with "System.in" as inputstream to read user input.
Simply use a Scanner or bufferedReader with "System.in" as inputstream to read user input.
#3
Posted 27 November 2011 - 07:52 AM
Well, if it is ok why don't you post your whole program here....
It will be easy to find a problem rather than guessing the issue.
It will be easy to find a problem rather than guessing the issue.
Lost!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









