Pedro Kowalski wrote:@Kevin Yeah, it's correct but the Serializable is just a marker interface. By explicitly implementing it, you're saying that you are aware of the serializable restrictions and your class is prepared for it.
As Ulf said - if one of your sublcasses implements the Serializable interface, it doesn't necesary mean that your class IS SERIALIZABLE.
Be aware that in the above sentences the "IS SERIALIZABLE" should be understood as the class that can be serialized, and not as the class that implements (implicitly) the Serializable interface.
if one of your sublcasses implements the Serializable interface, it doesn't necesary mean that your class IS SERIALIZABLE.
Ulf Dittmer wrote:It's perfectly possible for a subclass of a Serializable class not to be Serializable - by having a field that is not Serializable.
Mark Moge wrote:Ok I was wrong. And after some thinking ... in my opinion it works like this: if you have a generic declaration of a method
T from a metod works as T extends superclass of all arguments in method.
So you can put any type as argument:
Ireneusz Kordal wrote:change line 25 to:
Bert Bates wrote:Hi Guys,
The wait() and notify() topics are good topics, but they've been removed from the SCJP exam.
hth,
Bert
Henry Wong wrote:
"IS-A relationship" is the ability of an object of one class type to behave as another class type. Just because you are able to form an english sentence with "is" followed by "a", doesn't mean that there is a "IS-A" relationship involved.
Henry
Henry Wong wrote:
"IS-A relationship" is the ability of an object of one class type to behave as another class type. Just because you are able to form an english sentence with "is" followed by "a", doesn't mean that there is a "IS-A" relationship involved.
Henry