By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,637 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,637 IT Pros & Developers. It's quick & easy.

How to get user input?

P: 1
I want to get user input of integer value only and store it in a int. Then I want to take that int and make it a square root.

How would I get User Input?
Dec 17 '11 #1
Share this Question
Share on Google+
1 Reply


P: 22
BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
//to get user input
String str = stdIn.readLine();
//Convert String to int and use it.
Dec 19 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.