Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to take input from screen automatically

 
Ken M
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want the input from console but value should not be entered by user

e.g
BufferedReader buff = new BufferedReader(new InputStreamReader( System.in ));
System.out.println("Enter text");
buff.readLine();

Here user is not allowed to enter text.So , how program will get the text ?

Necessary condition is input should be taken from console only .
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Welcome to javaranch. Your display name does not follow the guidelines followed in here as specified in this link. Please change it to a realistic name.

Regarding your question;
What exactly you wish to do? You want to show the user the prompt but do not want him to enter anything. If you want the input from some other source then why do you prompt the user?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic