Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting inputs to be displayed in all caps

 
Giovanni Ong
Greenhorn
Posts: 4
  • 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
Marshal
Posts: 5209
508
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • 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
Posts: 12373
40
Chrome Java Linux
  • 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!