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!

Remove Spaces from String

807601Jan 29 2008 — edited Jan 29 2008
Hello every one, I'm a student in hight school taking object oriented programing.
I've been ahead of my class so far so the teacher has given me an extra thing to add to out current problem.

We have to create a program that:
1: Takes First name, and Last name
2: Counts the letters in each
3: Display them both and then add them.
*4: (This is the one the teacher suggests I try to do) have it not count spaces entered in to the dialog box.

Now So far I've got the basic assignment covered. I'm interested in solving number 4 however to impress the teacher.

<edit> Oop forgot the question, hehe.
Is there any method that either removes spaces from a string or counts the string without spaces?

I've got the code if its needed, If any one asks I'll add it.

Edited by: Voot_Lejin on Jan 29, 2008 3:44 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2008
Added on Jan 29 2008
6 comments
433 views