It's my first time to learn about
Java and I hope you will help me on how to debug this code..
This is the problem..
Write a program that reads in a whole bunch of words (each
word is no more than 20 characters) and spit out the duplicate words. For our purposes, words are to be separated by spaces, commas (,), !, ?, and periods (.). No word goes past the end of a line. All comparisons should ignore case.
Output: Output the sorted words, one per line, in lower case. Display same words only once.
Sample Input:
How much wood would a woodchuck chuck if a woodchuck could chuck wood? Well? What
do you think? Are you feeling well?
Sample Console:
a
are
chuck
could
do
feeling
how
if
much
think
well
what
wood
woodchuck
would
I tried to make one but unfortunately this code is still lacking..
-All comparisons should ignore case and duplicate words..
-because I used for loop, the words to be printed are not enough..
This is the Output:
How
a
a
chuck
if
much
wood
woodchuck
woodchuck
would