Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Substitute for Cin in Java??

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic