| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0 Thanked 4 Times in 4 Posts Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 5
|
What happens to the static fields of a class during serialization?
Q.) What happens to the static fields of a class during serialization?
|
|
|
|
|
|
#2 (permalink) |
|
Member
Join Date: Jan 2007
Age: 27
Posts: 83
Thanks: 1 Thanked 2 Times in 2 Posts Thanks: 1
Thanked 2 Times in 2 Posts
Rep Power: 2
|
Re: JAVA Question.
There are three exceptions in which serialization doesnot necessarily read and write to the stream. These are
1. Serialization ignores static fields, because they are not part of ay particular state state. 2. Base class fields are only hendled if the base class itself is serializable. 3. Transient fields. |
|
|
|
| The Following User Says Thank You to kkchaitanya_18 For This Useful Post: |
sk_kireeti (30-01-07)
|
|
|
#3 (permalink) |
|
Moderator
Join Date: Apr 2006
Location: India
Posts: 636
Thanks: 57 Thanked 77 Times in 62 Posts Thanks: 57
Thanked 77 Times in 62 Posts
Rep Power: 17
|
Re: JAVA Question.
As far as i know , the static fields cannot take part in serialization, because as chaitanya said, they are not part of any particular state.But am not sure completely about the answer
Any thoughts guyz/gals Thank You
__________________
M0h@n |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| J2EE - What does a static inner class mean? How is it different from any other static member | preethisingh | Java Interview / Technical Questions | 0 | 23-01-07 02:00 PM |
| java notes | naga | JAVA Technologies | 5 | 22-09-06 10:30 PM |
| java JSP | naga | JAVA Technologies | 4 | 21-08-06 05:03 PM |
| Answers Wanted to these QUESTIONS ? | aparna3032 | JAVA Technologies | 3 | 23-02-06 03:23 AM |
| JAVA PART3 | naga | JAVA Technologies | 0 | 18-02-06 07:48 AM |