• Post Reply Bookmark Topic Watch Topic
  • New Topic

Program example using KeyboardReader  RSS feed

 
R .sourav nayak
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
i am trying to run the following simple java program using KeyboardReader as input and it giving me the compile error saying can not find symbol KeyboardReader.

import java.util.*;
import java.io.*;

class KeyExp
{
public static void main(String[] args)
{

int x = KeyboardReader.readInt();

System.out.println("Hello World!" + x);

}
}

could someone tell me where i am doing wrong and can some write me a good program example using keyboardreader.

thanks in advance
reena
 
Petrus Pelser
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know which API you are using, but I can't find the class KeyboardReader anywhere in the standard API.

Try the following:
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where do you think KeyboardReader comes from? It's not in java.util or java.io, so where did you find it?
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!