• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use In.getInt( ) etc

 
judy mat
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jim!
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, BFG!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic