Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: Logarithms Please Help!
|
Posted: Nov 18, 2003 10:53 PM
|
|
"Console app" means no gui, so I would guess that using Swing is not an option. To read the input in this case, you'll probably want to use System.in. Additionally, if you want to have conveniences like reading lines, you can wrap it in a BufferedReader, like this:
BufferedReader input = new BufferedReader( new InputStreamReader(System.in) );
Then you can later do stuff like this:
System.out.println( "Type a number followed by the Enter key: " );
n = Integer.parseInt(input.readLine());
(of course, it might be a good idea to have some graceful error handling for junky input).
|
|