• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting inputs to be displayed in all caps

 
Giovanni Ong
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 4116
195
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12017
24
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic