File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Serialization in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Serialization in java" Watch "Serialization in java" New topic

Serialization in java

Nikhilesh Reddy Chaduvula

Joined: Mar 21, 2013
Posts: 6

Can anybody explain me why this is going to work. What I mean is Serializable is applicable here
but Serializable is not applicable here

The reason I am assuming is that all the array of objects are initialized to null and hence serialization applies here.
and if we change the above program as

It is serializable.I am having hard time in understanding these things.
I have followed this forum

Can any one correct/rectify me if my understanding is wrong.
Ankit Garg

Joined: Aug 03, 2008
Posts: 9466

Hi Nikhilesh,

If you slightly modify your code it would confirm if you are right or wrong. Change the line


Also please remember Serialization is not a part of SCJP exam objectives anymore...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: Serialization in java
It's not a secret anymore!