i was reading the code below:
My question is that the why is the casting done as in the statement seperated from the rest of the code? can somebody explain please?
======================================================
Past doubt:don't refer
Hi all,
The below is a statement from K & B book:
What does it really mean to save an object? If the instance variables are all primitive types, it's pretty straightforward. But what if the instance variables are themselves references to objects? What gets saved? Clearly in
Java it wouldn't make any sense to save the actual value of a reference variable, because the value of a Java reference has meaning only within the context of a
single instance of a JVM. In other words, if you tried to restore the object in another instance of the JVM, even running on the same computer on which the object was originally serialized, the reference would be useless.
what does the stuff in bold mean?
2] How do we know if something is non-serializable?Is there a way to find that out?