File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert to upper case

 
Ajay Joseph
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i used toUpperCase() function but some error like "char cannot be dereferenced " is coming

help me to conert first letter of all word in a sentence to upper case


ajay
 
John Dell'Oso
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajay,

Could you please post the code you have so far. From there we can point you in the right direction.

Regards,
JD
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i used toUpperCase() function but some error like "char cannot be dereferenced " is coming

You are calling it on a char. You can't call methods on primitive types like char.

If you have a single character that you want to make upper case, try this:
 
Stuart Ash
Ranch Hand
Posts: 637
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajay Joseph:
i used toUpperCase() function but some error like "char cannot be dereferenced " is coming

help me to conert first letter of all word in a sentence to upper case


ajay


Try this: http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/WordUtils.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic