Hello friends, i have a big problem whit exercise, i think i do every ok, but i
dont know how i can show profile and school. Somebody can help me??? please
public class serialization {
public static void main(String[] args) {
String filename = "MyClassToBePersisited.ser";
if(args.length > 0) {
filename = args[0];
}
Profile profile = new Profile("Alex",31,"Read book");
School school = new School("Eduardo Lobillo",1982);
MyClassToBePersisted myPerson = new MyClassToBePersisted(profile,
school);
More code here.......
............
..........
}
}
public class MyClassToBePersisted implements Serializable {
static final long serialVersionUID = -317105593566517899L;
private School school;
private Profile profile;
public MyClassToBePersisted(some code here......){
this.profile = profile;
this.school = school;
}
public Profile getProfile(){
return profile;
}
public School getSchool(){
return school;
}
}
public class DeserializeMyClassToBePersisted {
public static void main(String [] args) {
Some code here....
.........
.......
System.out.println("School: " + myPerson.getSchool().toString());
How can i show this:::??????????
System.out.println("Profile: " + myPerson.getProfile().toString());
}
}
Haz búsquedas con Live Search, ¡todas tus búsquedas tienen premio!
_________________________________________________________________
Descárgate ahora el nuevo Internet Explorer 8 y ten a tu alcance todos los
servicios de Windows Live ¡Gratis!
http://ie8.msn.com/microsoft/internet-explorer-8/es-es/ie8.aspx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---