Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could anyone help with this???

 
Anthony Vit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to uppercase my output and I have tried every which way and can't figure it out. Can anyone tell me how to do this??? I am desparate!!! thanks in advance.




 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you look carefully at the Javadoc page for the java.lang.String class?
 
shandilya popuru
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi tony

use this objname[i].toUpperCase() in print


bye
 
Anthony Vit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Sandy. Thanks for the input, but please don't think I am an idiot, but I don't know how to implement that statement. I am lost.
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.out.println(words[idx].toUpperCase());

Anthony words in this case was the object, so Sandilya gave you the answer.

Ernest gave enough of a hint for you to find the answer yourself. If you want to become a Java programmer you will have to learn use the javadocs to find the methods an object has.

It is our policy to help but not to spoon feed, I made an exception here for you because its x-mas.
 
Natesh Kurup
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You could replace the code in your class with the below statement



hope this helps

rgds

natesh
 
Anthony Vit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone for your help. I am not expecting people to spoonfeed me. I needed some help. I am new at this stuff and I have been staring at it for hours now. Sometimes the obvious is not that obvious. thanks again everyone for your help. It is MUCH APPRECIATED!!!
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anthony Vit:
.... I have been staring at it for hours now. Sometimes the obvious is not that obvious...


Sometimes it is best to get away from your PC when you are stuck and do something completely different. It is strange how given a bit of a rest the brain can recover and spot the answer to a problem that for hours had seemed impossible.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic