Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Putting an object instance into an ArrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Putting an object instance into an ArrayList

Shamsudeen Akanbi
Ranch Hand

Joined: Dec 24, 2010
Posts: 71
Hello Ranchers,
In this home automation application, I want to create an instance of DVDInfo for each line of data I read in from the dvdInfo.txt file. For each instance, I will parse the line of data and populate DVDInfo's three instance variables. Finally, I want to put all of the DVDInfo instances into an ArrayList. I don't know exactly how to start reading the instance variables into the ArrayList, that's even if my design is good. Thanks in advance!

Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

This looks the same as your other thread? http://www.coderanch.com/t/567151/java/java/Putting-object-instance-ArrayList Is it not?

Please UseOneThreadPerQuestion.(⇐click)
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

Jeff Verdegan wrote:This looks the same as your other thread? http://www.coderanch.com/t/567151/java/java/Putting-object-instance-ArrayList Is it not?

Please UseOneThreadPerQuestion.(⇐click)


Thanks Jeff for pointing it out.
Am locking this thread and lets continue the discussion in the thread Jeff pointed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Putting an object instance into an ArrayList
 
Similar Threads
Putting an object instance into an ArrayList
Sorting Collections
Confused with output of program using Scanner class
Collections and array Problem
Collections.sort() on Array List