Results 1 to 2 of 2
Thread: Error reading file
- 11-10-2012, 04:00 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 18
- Rep Power
- 0
Error reading file
OK, so I get another error right here. I have class B and class C extend abstract class A. I create a ArrayList<A> lst = new ArrayList<A>() then add both B and C objects type into that ArrayList then write that ArrayList to file data.dat. When I read it, only attributes from B and C is read to the ArrayList and attributes that B and C inherit from A is gonna be "null" and 0.
I would ask if this problem is caused by that I use generic type ArrayList<A> so only the attributes of B and C are read into ArrayList or by other reason. Finnaly, how to solve it? Thanks :)
- 11-10-2012, 04:29 PM #2
Member
- Join Date
- Oct 2012
- Posts
- 18
- Rep Power
- 0
Similar Threads
-
Error in reading from a file containing integers
By stud91 in forum Advanced JavaReplies: 1Last Post: 07-07-2012, 05:24 PM -
Error reading file
By sehudson in forum New To JavaReplies: 3Last Post: 03-01-2011, 04:44 AM -
Reading A CSV file error.
By jetnor in forum New To JavaReplies: 3Last Post: 02-05-2011, 03:51 AM -
error in reading objects from file
By sakshi in forum New To JavaReplies: 3Last Post: 07-27-2009, 08:17 AM -
reading from a zip file, error
By Mr tuition in forum AWT / SwingReplies: 1Last Post: 01-16-2008, 12:39 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks