In 2 java classes , If class A implements Serializable and class B extends A, then by default is Class B Serializable also? From what I understand, it is.
2 Answers
Yes. This follows from the concept of inheritance in Java. Since A is serializable and B extends A, B is serializalbe. Worth noting, notice that B is not "Default" Serializable, there is no choice as long as B extends A.
3 Comments
user207421
I don't know what your last sentence means.
John Ericksen
This means that if you extend class B, A will always be considered Serializable.
user207421
You already said that in your scond sentence. The last sentence just confuses things. I would delete it.