| Author |
how to use In.getInt( ) etc
|
judy mat
Greenhorn
Joined: May 04, 2003
Posts: 1
|
|
Can someone tell me, why the following code is not working, even I change the ln.getln() to ln.getChar() still not working. many thanks for your help public class h{ public static void main(String[] args){ i = ln.getlnt(); System.out.println(i); } }
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
Welcome to JavaRanch Judy. What do you mean "not working"`? As I see it, the code you have provided will not even compile because i is not declared. Also what is ln? What's its API? Why do you write "In" in the title and use "ln" in the code? Are you mixing up "els" and "eyes"? [ May 04, 2003: Message edited by: Barry Gaunt ]
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
What's this "In" your program is using? An object of some sort I imagine - what class is it? How was it created? When you say the program is "not working", what does this mean? Does the program compile? Do you get an error message of some sort? (What is it?) Do you get a result that is incorrect?
|
"I'm not back." - Bill Harding, Twister
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
Hi Jim!
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
Hi, BFG!
|
 |
 |
|
|
subject: how to use In.getInt( ) etc
|
|
|