views:

124

answers:

3

I could try an interface extending Serializable interface, So can we do that? if yes then will that extended interface will take the same effect as the Serilizable interface? If not Why?

+1  A: 

Yes, it's normal. I did it once when decided that all classes in my domain should be serializable. They implemented some interface already so I simply extended that interface from Serializable (as you describe).

Roman
+2  A: 

So can we do that?

Yes

will that extended interface will take the same effect as the Serilizable interface?

Yes

Tim Drisdelle
+5  A: 

Yes, you can extend the Serializable interface. If you do, all classes that implement the new subinterface will also be implementing Serializable.

akf