This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes is static variables serialized? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "is static variables serialized?" Watch "is static variables serialized?" New topic
Author

is static variables serialized?

Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
i have a doubt in serialization. i have read that static variables are not serialized.
but when i tested it does...?


whats happening here?
does static variables saved on serialization?

thanks in advance....
Prasad Kharkar
Ranch Hand

Joined: Mar 07, 2010
Posts: 438

This is not the question about serialization

STATIC VARIABLES ARE NOT SERIALIZED AT ALL


Always remember that static variable directly related to class and not the objects
see the code


hence as variable a does not belong to object, it does not get serializable
when we are using obj.a it is same as Model.a which comes out to b 17


hope this helps


SCJP 6 [86%] June 30th, 2010
OCPWCD [84%] March 26th, 2013
If you find any post useful, click the "plus one" sign on the right
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
thanks Prasad Kharkar
got it
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

Remember, serialization is not on the SCJP exam anymore...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
are you right Ankit Garg ?
new information for me. but Kathy Sierra book for SCJP6 has that topic in it?
can you give new latest syllabus please?
Hareendra Reddy
Ranch Hand

Joined: Jan 09, 2011
Posts: 173

Hello Jomy George,
In addition to serialization concepts ,wait/notify/notifyAll concepts also have been removed from objectives..
Compare the objectives given in K&B with this objectives
Shahrukh Naqui
Greenhorn

Joined: May 01, 2010
Posts: 14

Hi,

The exam topics are listed on Oracle's OCPJP page


Does anyone know why Serialization was removed as an examinable topic?
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
thanks Ankit Garg and Hareendra
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Shahrukh Naqui wrote:Hi,

The exam topics are listed on Oracle's OCPJP page


Does anyone know why Serialization was removed as an examinable topic?


May be because of the complexity? May be they wanted a change? there are so many options I do have when I thought of it..

Bert can answer this question


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Mohamed Omar Mukadam
Greenhorn

Joined: Nov 19, 2009
Posts: 3
Hi all,

Is there in that case any topic/objective that is NOT covered in Sierra/Bates but has been added to the objectives?

Cheers.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hello Mohammed Omar,

Welcome to JavaRanch

I do NOT think so!
Mohamed Omar Mukadam
Greenhorn

Joined: Nov 19, 2009
Posts: 3
Hi Raghavan,

You can never be too sure, right !?

Thanks for that
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Mohamed Omar Mukadam wrote:Hi Raghavan,

You can never be too sure, right !?

Thanks for that


Hi Mohammed,

I did mean that there are no possibilities at all as Kathy Seirra and Bert Bates were official bearers of SCJP (now OCPJP) exams. So their book would definitely contain the entire and exact syllabus!

Hope this helps!!
Mohamed Omar Mukadam
Greenhorn

Joined: Nov 19, 2009
Posts: 3
Hello again Raghavan,

I understood your first reply, and appreciate the fact that sierra & Bates covers the whole exam.

Thanks again mate.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

You are welcome Mohammaed! Glad indeed!
 
Consider Paul's rocket mass heater.
 
subject: is static variables serialized?