This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make a user-inputed word remembered?

 
Nik Badger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I use the function like the one like this:


I want to have one exactly like the function of remembering the double except with letters. Is this possible?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12122
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
of course it is possible. have you looked at the API to see if the Scanner class has a method that might help you?
 
Nik Badger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a huge noob to this lol. No I havent
 
Campbell Ritchie
Sheriff
Posts: 48910
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
You can find out about Scanner here, and there is a section in the Java tutorials which you can find with ctrl-F-Scanner.
There is a well known pitfall with Scanner which isn’t in many of the books: I have described it here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic