?
Solved

get key from console

Posted on 2001-06-13
3
Medium Priority
?
247 Views
Last Modified: 2006-11-17
what is the method to get input from the java console whan a n application running ? similar get input from keyboard in C getchr(), etc...
0
Comment
Question by:adrianmak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:yongsing
ID: 6185008
You can use System.in.read();
0
 
LVL 9

Accepted Solution

by:
Ovi earned 20 total points
ID: 6185036
System.in.read()
0
 

Expert Comment

by:jatom
ID: 6185929
you can simply use System.in.read(),but if you want more flexibility you can wrap it in BufferedReader,for example
BufferedReader cin;
try{
cin = new BufferedReader(new InputStreamReader(System.in));
}
catch (IOException ioe){
}
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question