variable « serialize « Java I/O Q&A





1. Serializing private variables in java    stackoverflow.com

I have a question on serialization. If my class has private variables and there are no getters and setters, then how will the value of these variables be read by ...

2. Assign the result of a serialization to a variable    stackoverflow.com

I have an object that I would like to serialize. The thing is, I don't want to send this in a FileOutputStream or ObjectOutputStream. Instead, I want to assign the result ...

3. What will happen to classCounter Variable?    stackoverflow.com

If I serialize this object and then again deserialize and get object what will be value of classCounter? I created 5 object classCounter = 5 what I will get in new ...

4. Why volatile variable can't be serialized?    coderanch.com

As far as I know, and I have just skim-read the "volatile" section of the language spec and the introduction to the Serialisation spec, the "volatile" keyword has no effect on serialisation. The "volatile" keyword, as you say, is about maintaining a consistent view of the field between threads. It is "transient" that controls serialisation. I could find no evidence of ...