• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Basic Java Serialization question

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic