I want to know in which order the attributes of the following example class would be serialized:
public class Example implements Serializable {
private static final long serialVersionUID = 8845294179690379902L;
public int score;
public String name;
public Date eventDate;
}
EDIT:
Why i wanna know this:
I got a serialized string in a file for a class of mine which has no implementation for readObject() or writeObject(). now that implementation changed ( some properties are gone ) and i want to write a readObject() method that handles the old serialized class.
There i would just read this property but wouldnt save it to the created object.
This is basically just for legacy i use a database now but need to support the old serialized files.
to write this readObject() i need the order of properties that in the stream.
m curios how the standard serialization proceeds so i
m staying with my original question. – Lockridge