• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

S & B SCJP 6 - MasterExam Quiz B Q 30 Erratum

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Question given is which of four statements are true, where the only one specified to be so reads:
"When an object is serialized, if it has references to other objects, those objects must be serializable."

This is not true if the instance variables establishing the references are declared as transient.
To be correct, he statement could be changed to e.g.
"When an object is serialized, if it has non-transient references to other objects, those objects must be serializable.".

Or am I misinterpreting something here?

Regards,
Erik

 
Sheriff
Posts: 9707
43
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
Well Eric you are right. But I think since the statement is silent about the fields being transient or not, so the interpretation would be that the fields are not transient. It is just like if you say this

"you can change the value of fields of a class"

Here the statement is not considering the special case of final class fields. So I think that you must not consider that special case if nothing is mentioned...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic