Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

get an int input from user

807598Oct 31 2006 — edited Oct 31 2006
System.out.println("Enter number")

im trying to retrieve the number during running the program
i know in C++ its
cin>>x;
how is it done in java ???
I have tried
int input = Integer.parseInt(args[0]);
but that wont work becuase in this way im not allowing the user to enter multiple number while the program is running
so basically .. what is : cin>>x in java ....
and i also want to ask the user to enter a name .. multiple time
thank you guys
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2006
Added on Oct 31 2006
8 comments
177 views