• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Serialization

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I am confused about this statement is it true?

It is legal to serialize an object of a type that has a super type that does NOT implement java.io.Serializable.
Please suggest me.
 
Sheriff
Posts: 9678
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes its legal. A serializable class can be serialized even if its parent class is not serializable. This is from the javadocs of Serializable class

To allow subtypes of non-serializable classes to be serialized, the subtype may assume responsibility for saving and restoring the state of the supertype's public, protected, and (if accessible) package fields. The subtype may assume this responsibility only if the class it extends has an accessible no-arg constructor to initialize the class's state. It is an error to declare a class Serializable if this is not the case. The error will be detected at runtime.


Also serialization is not a part of SCJP exam now...
 
Anupam anand
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:Yes its legal. A serializable class can be serialized even if its parent class is not serializable. This is from the javadocs of Serializable class

To allow subtypes of non-serializable classes to be serialized, the subtype may assume responsibility for saving and restoring the state of the supertype's public, protected, and (if accessible) package fields. The subtype may assume this responsibility only if the class it extends has an accessible no-arg constructor to initialize the class's state. It is an error to declare a class Serializable if this is not the case. The error will be detected at runtime.


Also serialization is not a part of SCJP exam now...



Thanks.
In which version SCJP exam Serialization is not there?
 
Ankit Garg
Sheriff
Posts: 9678
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Serialization is not a part of SCJP 5 and 6 both...
 
Anupam anand
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:Serialization is not a part of SCJP 5 and 6 both...



But ,I have syllabus of SCJP 5 in which Serialization topic is there.But not sure about SCJP 6 syllabus.
Are you sure?please ,inform me.

Thanks
Anupam
 
Ankit Garg
Sheriff
Posts: 9678
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are the official objectives of the exam from Oracle
Scjp 5, Scjp 6...
 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ankit,

In K&B Book, Serialization is available there for SCJP Exam. Is there is any syllabus review from Oracle recently.
If this is the case, In which book should we get the updated content of syllabus.

Please suggest.

Thanks.
 
Anupam anand
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:Here are the official objectives of the exam from Oracle
Scjp 5, Scjp 6...



Thanks,
 
Ankit Garg
Sheriff
Posts: 9678
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rahul Nair wrote:In K&B Book, Serialization is available there for SCJP Exam. Is there is any syllabus review from Oracle recently.
If this is the case, In which book should we get the updated content of syllabus.


Yes the objectives were updated some time back. I already gave the link to the objectives. No topic was added to the exams, only topics like serialization, wait and notify methods were removed...
 
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But to add......Some candidates are still getting questions on the removed topics...So be cautious !!!

 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic