Forums Register Login

Initial Capital

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Moving to Java In General (Beginner) forum...
+Pie Number of slices to send: Send
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.
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1365 times.
Similar Threads
addition and subtraction of time
Which IDE support JSP 2.0
java
ArrayList vs Vector Size and Capacity difference ?
J2EE Techology
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:39:11.