• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner class serialisation

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

if super class implements serialzable interface all other classes which extends the superclass do not need to imlepment serialzable interface.
what if they do what will happen?

And what I want to know is does this rule applies to inner, ananyomus, nested classes too or not?

Regards,
rahul.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that rule applies to all classes. (And it applies to all interfaces, not just Serializable.) A nested class is a class so that rule applies to it.

Unless you were thinking that the application of the rule would be "If a class implements an interface then all classes nested in it automatically implement that interface". That is not what the rule says.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Clapham:
Yes, that rule applies to all classes. (And it applies to all interfaces, not just Serializable.) A nested class is a class so that rule applies to it.

Unless you were thinking that the application of the rule would be "If a class implements an interface then all classes nested in it automatically implement that interface". That is not what the rule says.



i did not get the 2nd para?
[ September 01, 2006: Message edited by: rauhl roy ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic