Thank you Nmae:
I created 2 objects (Profile and School) but I have 2 errors with the
same message, yet.
I did the next:
1.- I applied inheritance between SerializeMyClassToBePersisted and
MyClassToBePersisted.
2.- I created 2 objects in SerializeMyClassToBePersisted, but I have 2
error, in the next block, yet.
// Create an object
Profile pfl = new Profile(); ***** error here *****
pfl.name = "Name1";
pfl.age = 10;
pfl.hobby = "hobby1";
// Create an object
School sch = new School(); *****error here*****
sch.nameOfSchool = "name College";
sch.yearStarted = 2000;
The error is “non-static variable this cannot be referenced from a
static context”
I returned to study Chapters 3 and 4 about Classes and Object and
Inheritance.
I tested some changes but I feel very confused.
Would give me some advice about this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---