This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Initial Capital Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Initial Capital" Watch "Initial Capital" New topic
Author

Initial Capital

prabhu kandanur
Ranch Hand

Joined: Oct 18, 2003
Posts: 34
Hi All
How to contert the string say 'hello how are you' to 'Hello How Are You'
(initial capitals) in java any source available
and where can i get the sample core java source code examples that is useful for application development.

prabhu
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Moving to Java In General (Beginner) forum...


GenRocket - A Test Data Generation Platform
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
Off the top of my head, I see 2 ways of handling this.
1- recursively break the string into its component words, the end condition for the recursion would be that there are no more spaces in the string. Then return an assemblage of capitalized words.
2- use the String.split method to produce an array of individual words, capitalize each one and reassemble.
There are, I'm sure, other ways of doing this.
There exists on the web more example Java code than you could read in the rest of your days, trying looking for what you need.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Initial Capital
 
Similar Threads
J2EE Techology
Which IDE support JSP 2.0
java
addition and subtraction of time
ArrayList vs Vector Size and Capacity difference ?