Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Removing whitespaces and weird characters

843785Sep 16 2008 — edited Sep 23 2008
Hi,
I need a way to remove the whitespaces and punctuation marks from a String.
So for example,
"This is a cool racecar!, right?"
should be read as
"thisisacoolracecarright"

After googling for a while, I think I can use a split() method or a BufferedReader, but I don't know how to proceed. Can anyone point me in the right direction?
This is part of my homework, so I really don't want you to solve it for me, but just help me look in the API or type in a sample code.

Help would be greatly appreciated.
-Rommel.

PS: 10 duke starts to be awarded.

Edited by: RommelTJ on Sep 15, 2008 9:52 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2008
Added on Sep 16 2008
16 comments
496 views