wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes How to take input from screen automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "How to take input from screen automatically" Watch "How to take input from screen automatically" New topic
Author

How to take input from screen automatically

Ken M
Greenhorn

Joined: Nov 21, 2007
Posts: 1
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

Joined: Feb 25, 2007
Posts: 1638

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?


apigee, a better way to API!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to take input from screen automatically
 
Similar Threads
A looping algorithm question?
Runtime.getRuntime() execute script which asks for input from user.
2d array
urgent help! my while loop is not working
Input from a keyboard