A query about serialization
On page 527 of the book 'Beginning Java 2 JDK 5 edition' it is written that the class has to meet three basic conditions for an object of the class to be written to a stream. First two conditions are--
i) The class must be declared public.
ii)The class must implement interface 'Serializable'.
The second condition is obvious and can be understood well.However I was able to serialize a class that has default access in the package (not a public class).So I am not exactly sure what is meant by first condition.
Your response will be highly appreciated.