This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 3011
    
  34

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.


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11150
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
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