• Post Reply Bookmark Topic Watch Topic
  • New Topic

string capitalise  RSS feed

 
Molefhi Sebaka
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
memati bas
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Robert Hill
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!