Hi,
I have been trying to learn java on my own on Linux from command line. Can any one please give me a few very basic samples of code that ask the user for an input (interger/double/float/string all possible data types)? I have downloaded the official Sun Java tutorials but it does not contain many examples of user input from command line. Thanks...
tech291083 5 Junior Poster
Recommended Answers
Jump to Post— Member #46692google + java util scanner? (Maybe)
Jump to Post— jwenting 1,905System.out.println("Please provide some input");That's all you need to do to ask for input.
How you capture that input and what you do with it i'll leave as an exercise to the reader.
Jump to Post— peter_budo 2,532Sun Java Tutorial website always good place to start
Basic I/O. As iamthwee said scanner is what you looking for start so Scanning is your tutorial, reading rest of it will not harm you …
All 9 Replies
Member #46692
jwenting 1,905 duckman Team Colleague
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
tech291083 5 Junior Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
jwenting 1,905 duckman Team Colleague
indienick 7 Junior Poster in Training
jwenting 1,905 duckman Team Colleague
indienick 7 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.