as part of a project at uni i have been asked to provide object persistance
through files
I have opted for serialization
my question is quite simple
when u use serialization is an object saved to a single file or are more
than one object(s) saved to a single file?
say i have three objects, will they all be saved into one file or will there
be three seperate files each having one object saved into them?
also say i have a superclass implmenting the java.io.Seriali zable
will all subclasses of that superclass automatically implement the
java.io.Seriali zable or will i need to make those subclasses implement the
Serializable seperately?
any help would be appreciated
PS -
public class UserData implements java.io.Seriali zablei understand that
but..public class UserData extends User...how would i implement the
java.io.Seriali zable in that class? would it be...public class UserData
implements java.io.Seriali zable extends UserORpublic class UserData extends
User implements java.io.Seriali zableThanks in advanceChristo
through files
I have opted for serialization
my question is quite simple
when u use serialization is an object saved to a single file or are more
than one object(s) saved to a single file?
say i have three objects, will they all be saved into one file or will there
be three seperate files each having one object saved into them?
also say i have a superclass implmenting the java.io.Seriali zable
will all subclasses of that superclass automatically implement the
java.io.Seriali zable or will i need to make those subclasses implement the
Serializable seperately?
any help would be appreciated
PS -
public class UserData implements java.io.Seriali zablei understand that
but..public class UserData extends User...how would i implement the
java.io.Seriali zable in that class? would it be...public class UserData
implements java.io.Seriali zable extends UserORpublic class UserData extends
User implements java.io.Seriali zableThanks in advanceChristo
Comment