File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Convert to upper case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert to upper case " Watch "Convert to upper case " New topic
Author

Convert to upper case

Ajay Joseph
Greenhorn

Joined: Nov 04, 2004
Posts: 21
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

Joined: Apr 08, 2004
Posts: 130
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

Joined: Aug 16, 2005
Posts: 14266
    
  21

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:


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Stuart Ash
Ranch Hand

Joined: Oct 07, 2005
Posts: 637
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


ASCII silly question, Get a silly ANSI.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Convert to upper case