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!

Alphabetizing?

807600Oct 15 2007 — edited Oct 16 2007
My current assignment has me stumped. I am a new programmer taking his first course and I am unsure how to go about writing this program.

The assignment requires me to write a program that will prompt the user to write a line of words. The program will then take all of these words and alphabetize them and print them back out. It will also give a word count, which i know how to do, and then reprompt the user to write another line. If the user has "quit" anywhere, then the program exits.

The program must define and use a method that removes a word from a string
and returns the resulting string, with the following method header:
static String RemoveWord ( String Line, String Word )

I have never used this line before, and do not know what it means. I have done basic String manipulation but this one absolutely baffles me. Does anyone have any suggestions or enlightening advice that would point me in the right direction to write this program?
Also, how would i go about having the program exit if it sees the word "quit".
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2007
Added on Oct 15 2007
15 comments
126 views