JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Marilyn deQueiroz:
[B]If you "put" Strings into the ArrayList, you can "get" Strings out of the ArrayList.
Thanks Marilyn! How was your vacation? Welcome home!!!
I was thinking for some reason, that an ArrayList was a complete unit and since it was read in from another file, it had to be treated as a whole. Don't know where I got that idea, but then I stumbled onto the get() method which had eluded me until now, and I was able to write code to print each last name. Now I'm stuck again trying to plug it all into sort()!
Originally posted by Carol Murphy:
I keep going back to that, hoping it will make more sense each time I read it......
I have been poring over this tutorial, but it is way over my head in many places, I'm afraid. I just have to keep plugging away at it and hope that it will all click eventually. Right now I feel like an idiot!
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Carol Murphy:
Now I am trying to pass a substring into sort as the Comparator, but I am getting this error message:
Incompatible type for method. Explicit cast needed to convert Comparator to java.util.Comparator.