This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Here's the DVD data that's in the dvdinfo.txt file: Donnie Darko/sci-fi/Gyllenhall, Jake Raiders of the Lost Ark/action/Ford, Harrison 2001/sci-fi/?? Caddy Shack/comedy/Murray, Bill Star Wars/sci-fi/Ford, Harrison Lost in Translation/comedy/Murray, Bill Patriot Games/action/Ford, Harrison
I didn't understand the following paragraph
we want to create an instance of DVDInfo for each line of data we read in from the dvdinfo.txt file. For each instance, we will parse the line of data (remember String.split()?) and populate DVDInfo's three instance variables. Finally, we want to put all of the DVDInfo instances into an ArrayList. Imagine that the populateList() method (below) does all of this. Here is a small piece of code from our application:
ArrayList<DVDInfo> dvdList = new ArrayList<DVDInfo>(); populateList(); // adds the file data to the ArrayList System.out.println(dvdList); You might
how does populateList of method looks with necessary coding? can any one help with coding to understand populateList() method