This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Getting inputs to be displayed in all caps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Getting inputs to be displayed in all caps" Watch "Getting inputs to be displayed in all caps" New topic
Author

Getting inputs to be displayed in all caps

Giovanni Ong
Greenhorn

Joined: Jun 30, 2009
Posts: 4
How do I write a program in which all the INPUTS are displayed in caps.

So if I write a sentence it will go like this.

Hi, my name is GIOVANNI.
_____________^^^^^^^
_____________This being what is inputted.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3023
    
  35

Giovanni Ong wrote:How do I write a program in which all the INPUTS are displayed in caps.

So if I write a sentence it will go like this.

Hi, my name is GIOVANNI.
_____________^^^^^^^
_____________This being what is inputted.


I didn't understand what you need exactly to do. However, java.lang.String class has a method name toUpperCase and I think that would be helpful.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11170
    
  16

in other words, what you do it take whatever input they give you, convert it yourself to all caps, then print THAT as your output.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
Consider Paul's rocket mass heater.
 
subject: Getting inputs to be displayed in all caps
 
Similar Threads
SCJP PREPARATION HELP
division by zero
Statics
Caps Lock
error while adding Tomcat 7 in eclipse