Every instance of a class which implements java.io.Serializable is
serializable.
For example:
public class Human1 implements java.io.Serializable {
...
Integer getValue() {
return 1;
}
}
==============================
public class Human2 implements java.io.Serializable {
...
Integer getValue() {
return 1;
}
}
Please not that the value of every method of an serializable class is
unique.
In the above samples both getValue() value of 1 but those
are serializable values. Therefore, you may not compare two Integer objects.
new Human1().getValue() <> new Human2().getValue()
To compare two Integer objects we should compare their intValue():
new Human1().getValue().intValue() = new Human2().getValue().intValue() = 1
On Mon, Jan 14, 2013 at 12:55 PM, Surpreet Singh Dhunna <
[email protected]> wrote:
> *Serialization* is the process of converting an object into a stream of
> bytes in order to store the object or transmit it to memory, a database, or
> a file.
>
>
> On Mon, Jan 14, 2013 at 11:15 PM, Zinal Shah <[email protected]>wrote:
>
>>
>>
>> On Sun, Jan 13, 2013 at 1:10 PM, karthikeyan balamurugan <
>> [email protected]> wrote:
>>
>>> What is java serialization
>>>
>>> -- Answer:
>>
>>
>>
>>> Serialization is just an object which is used for save state of data.
>>>
>>
>>
>>
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Code Jam" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Code Jam" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.