aspose file tools*
The moose likes Beginning Java and the fly likes string capitalise 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 "string capitalise" Watch "string capitalise" New topic
Author

string capitalise

Molefhi Sebaka
Greenhorn

Joined: Feb 23, 2006
Posts: 1
i need help on how to capitalise the first letters in a string: example "my name is" to output "My Name Is"
Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
A quick look at the string class methods should tell you what two methods you can use for this.

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html


"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
memati bas
Ranch Hand

Joined: Jan 29, 2006
Posts: 85
Robert Hill
Ranch Hand

Joined: Feb 24, 2006
Posts: 94
StringTokenizer has been deprecated for a long time and should not be used. There is a better alternative in the String class.

Also doing someones homework for them is counter-productive.
 
jQuery in Action, 2nd edition
 
subject: string capitalise