Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic Java Serialization question

 
K Duke
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In what order do parameters of a class get serialized using writeObject(ObjectOutputStream)
Assume a class Person:
class Person {
private int age;
private String firstName;
private String lastName;
private String hometown;
....
}
SO when I do the foll:
Person p;
p.writeObject(oostream);
Will the parameters get written in the order they are declared in the class?
i.e. age, firstName, lastName, hometown
OR
Are they serialized in alphabetical sequence? i.e age, firstName, hometown, lastName??
Thanks,
[ March 24, 2004: Message edited by: K Duke ]
[ March 24, 2004: Message edited by: K Duke ]
 
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!