Nicola Garofalo wrote:Hi Nick,
In your last example add this code at line 19 for example
I ensure you that compiler won't complain after you told what beg and end are
Nicola Garofalo wrote:Line 8 is wrong
doesn't mean anything.
You must say the compiler that you ArrayList will hold String objects. To do that write that line as follows.
Nicola Garofalo wrote:
No, no output at all.
What do you want to do with that newly created ArrayList?
Do you want to print it out, or put it in a file? it's up to you.
With the code posted you filled the arrayList, now do something with it, whatever you like.
Campbell Ritchie wrote:Is there a sort() method in the List interface? You may mean Collections.sort(myList);
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton