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 Postgoogle + java util scanner? (Maybe)
Jump to PostSystem.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 PostSun 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
iamthwee
jwenting
1,889
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,889
duckman
Team Colleague
indienick
7
Junior Poster in Training
jwenting
1,889
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.