• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is static variables serialized?

 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Prasad Kharkar
got it
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember, serialization is not on the SCJP exam anymore...
 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ankit Garg and Hareendra
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mohamed Omar Mukadam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mohammed Omar,

Welcome to JavaRanch

I do NOT think so!
 
Mohamed Omar Mukadam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raghavan,

You can never be too sure, right !?

Thanks for that
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome Mohammaed! Glad indeed!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic