Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Substitute for Cin in Java??

 
divyasheel sharma
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
Like we have Cin in C++ (actually I dont know much C++ either)
Can anyone help me out , how we input values from keyboard in Java program say I need to make a program...
To read two numbers from keyboard and display the larger value on screen.
So I need in output... I can put various numbers and run the program.
Rgds
Divya
------------------
Eat Java,Drink Java...surf only Javaranch!
 
divyasheel sharma
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Cindy!
Actually I just read the discussion on input from keyboard with Rashid, but I cud not get it , can u explain with the code for the program I have mentioned.
Thanx in advance.
Divya
------------------
Eat Java,Drink Java...surf only Javaranch!
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try something like this:

[This message has been edited by Cindy Glass (edited February 19, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic