aspose file tools*
The moose likes Beginning Java and the fly likes need help with user input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "need help with user input" Watch "need help with user input" New topic
Author

need help with user input

Ken Ng
Greenhorn

Joined: Feb 14, 2004
Posts: 26
hi all, can someone help me with the following problem.
(console application)
1. What is the code to "erase" (delete) a user input
-Consider the prompting message,
Enter choice (1,2 or 3) here: _
-If user enter an invalid value and press Enter,
Enter choice (1,2 or 3) here: 4
-The entered valued 4 will sort of "backspaced" and the prompt statement remains waiting for another input,
Enter choice (1,2 or 3) here: _

2. What is the code to clear screen like the cls command used in the command prompt, e.g consider the following display.
1. Convert time to seconds
2. Display help info
3. Exit
Enter choice here: 1
Enter hour: 1
Enter minutes: 30
Enter seconds: 30
No. of seconds is 5430
Press ENTER to continue _
-When user press Enter, the screen is cleared and the original prompting message remains waiting for next input.
1. Convert time to seconds
2. Display help info
3. Exit
Enter choice here: _
Many Thanks to anyone for the help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help with user input
 
Similar Threads
Sorry i only know how to do until this part pls help...
Reading a Character
Do not know how to code some cases and exit the loop with "Enter"
How to accept Multiline conditional input through console in java program....
Binary to Decimal conversion