why some classes are not serializable

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 8
Reputation: sasidharnet is an unknown quantity at this point 
Solved Threads: 0
sasidharnet sasidharnet is offline Offline
Newbie Poster

why some classes are not serializable

 
0
  #1
Jun 20th, 2008
Classes Like Threads,Streams,Runtime and some of awt not serializable.
Please tell me the Reason.
This is asked in my interview.
I said, classes which have native code will not be serializable.
Is it correct?

Please give detail note.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: why some classes are not serializable

 
0
  #2
Jun 21st, 2008
learn Java.
You obviously lack the knowledge for that job, people giving you the answers so you can send them in as your own in order to get it is doing ourselves a disservice.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 8
Reputation: sasidharnet is an unknown quantity at this point 
Solved Threads: 0
sasidharnet sasidharnet is offline Offline
Newbie Poster

Re: why some classes are not serializable

 
0
  #3
Jun 21st, 2008
Originally Posted by jwenting View Post
learn Java.
You obviously lack the knowledge for that job, people giving you the answers so you can send them in as your own in order to get it is doing ourselves a disservice.

I searched every where I didn't find the answer.

Without taking inputs from others how can we improve our knowledge.

How you learned java your own, you also studied some books or else by berth you know java.

I faced so many questions in that interview but I didn't answer this correctly.

Any way, I just want to know the answer.

If any one knows Please tell why we can not serialize some classes.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: why some classes are not serializable

 
0
  #4
Jun 21st, 2008
Originally Posted by sasidharnet View Post
I searched every where I didn't find the answer.

Without taking inputs from others how can we improve our knowledge.

How you learned java your own, you also studied some books or else by berth you know java.

I faced so many questions in that interview but I didn't answer this correctly.

Any way, I just want to know the answer.

If any one knows Please tell why we can not serialize some classes.

Read the actual use of those classes, why they exist and exactly what is serialization used for and you will get your answers.
And obviously you have not been searching everywhere or at least the right places else you would have found it.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: why some classes are not serializable

 
0
  #5
Jun 21st, 2008
the right places being any decent book (or probably websites too) on Java that touches on serialisation...
Or common sense.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,511
Reputation: Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future 
Solved Threads: 522
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: why some classes are not serializable

 
0
  #6
Jun 21st, 2008
Yes, just read on serialization itself and you should understand why some of those are not serializable and why it's not appropriate for them to be.
Here's a good place to start: http://www.codeguru.com/java/tij/tij0116.shtml
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 16
Reputation: icorey has a little shameless behaviour in the past 
Solved Threads: 3
icorey icorey is offline Offline
Newbie Poster

Re: why some classes are not serializable

 
-3
  #7
Jun 22nd, 2008
here's something i found (from a forum, as it turns out)
http://www.velocityreviews.com/forum...ble-error.html

and some of you guys like to be dicks. i hope it makes you feel really awesome, because it just makes everyone else feel stupid.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: why some classes are not serializable

 
0
  #8
Jun 22nd, 2008
we don't make people feel stupid. At worst we make them aware of their existing stupidity, which is the first step towards getting rid of that stupidity.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1582 | Replies: 7
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC