Go Back   Java Programming Forums > Java Standard Edition Programming Help > Algorithms & Recursion


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-02-2010, 04:11 AM
Junior Member
 

Join Date: Feb 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
dvsumosize is on a distinguished road
Default making a sentence proper

hi i hope im posting in the right part, if not, please forgive me ill make sure to post in correct part next time then.

hi ive just started in my java class nad the teacher has required to change an input of "ThE bROwn Fox jumpS" into an output of "The Brown Fox Jumps" how do i make the first of every word capitalized when outputted?



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 02-02-2010, 07:53 AM
Junior Member
 

Join Date: Feb 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
dvsumosize is on a distinguished road
Default Re: making a sentence proper

ok so what i exactly have to do is take a string input of unknown word length and create an output with all of the words having the first letter capitolized.
Reply With Quote
  #3 (permalink)  
Old 02-02-2010, 07:56 AM
Json's Avatar
Super Moderator
 

Join Date: Jul 2009
Location: Manchester, United Kingdom
Posts: 1,157
Thanks: 54
Thanked 136 Times in 132 Posts
Json will become famous soon enoughJson will become famous soon enoughJson will become famous soon enough

I'm feeling Happy
Default Re: making a sentence proper

Hello there, I guess this is the wrong forums as you're not really showing us any code which you believe is broken. However I shall try to give you a little tip on how to solve this one.

- Split the string on white space, this should give you an array of all the words in the sentence.
- Loop through all the words and lower case them and make the first character upper case and print them out.

Now that should get you started, its fairly easy and if you give it a shot and you still have problems, come back here and post some code and someone will point in the right direction again.

If you dont know how to split the string or do loops, have a look at The Really Big Index

// Json
Reply With Quote
  #4 (permalink)  
Old 02-02-2010, 01:58 PM
Junior Member
 

Join Date: Feb 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
dvsumosize is on a distinguished road
Default Re: making a sentence proper

may i ask what the really big index is?
Reply With Quote
  #5 (permalink)  
Old 02-02-2010, 08:07 PM
helloworld922's Avatar
Super Moderator
 

Join Date: Jun 2009
Posts: 1,215
Thanks: 5
Thanked 258 Times in 234 Posts
helloworld922 will become famous soon enoughhelloworld922 will become famous soon enoughhelloworld922 will become famous soon enough
Default Re: making a sentence proper

It's a link to Sun Java's tutorials on learning the Java language (hover your mouse over and click)
__________________
ASCII a question .. Get an ANSI

Please surround your code with [highlight=Java]code goes here[/highlight].
Reply With Quote
  #6 (permalink)  
Old 03-02-2010, 03:01 PM
Json's Avatar
Super Moderator
 

Join Date: Jul 2009
Location: Manchester, United Kingdom
Posts: 1,157
Thanks: 54
Thanked 136 Times in 132 Posts
Json will become famous soon enoughJson will become famous soon enoughJson will become famous soon enough

I'm feeling Happy
Default Re: making a sentence proper

Its Really Big

// Json
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help making program ixjaybeexi Collections and Generics 5 07-12-2009 03:36 AM
"java -version" doesn't display proper value. goldest Java Theory & Questions 6 01-11-2009 07:48 PM
reading a sentence lotus File I/O & Other I/O Streams 4 20-07-2009 01:29 PM
[ASK]making a map donjuan AWT / Java Swing 3 15-05-2009 08:32 AM
Reading in a date and validating it with proper calendar regex scottyadam Java SE APIs 1 01-03-2009 02:05 AM


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 02:04 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.