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.

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.

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.

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.

the right places being any decent book (or probably websites too) on Java that touches on serialisation...
Or common sense.

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

here's something i found (from a forum, as it turns out)
http://www.velocityreviews.com/forums/t150364-which-objects-or-classes-cannot-be-serialized-not-serializable-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.

commented: big mouth, haven't you... -4
commented: I think you could have made this point with calling people "dicks". -2
commented: Common Sense is enough for answering this question, if thats not enuf the the first search result on Google is. +0

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.

Hi All ,

Classes are not serialzed because they hit efficiency of java directly.
Imagine what would happen if we remotely invoke a class over the network for execution ,definitely it will occupy whole bandwidth and bandwidth will be lost.

An alternative available in java is to add URL of the class so that jvm could find the class.And hence no need to serialized a heavy size class.

@csanuj:
1. This thread is from 2008
2. If that was supposed to be an answer to this long-dead thread, it is completely wrong anyway.

Then what is the right answer dear.

If you want a question answered then start your own thread. Hijacking zombie threads is against DaniWeb rules.

Bull shit.
How you can say it.
You don't have any right answer of your own and you are giving a cross to my answer.
Please make concrete criticism with reason.Otherwise people will be thinking it a time waisting nothing else.

commented: bet he does know the right answer, and he did provide concrete criticism with reason. -3

Bull shit.

Keep It Pleasant
Do not use offensive or obscene language

Jun 21st, 2008

Keep It Organized
Do not hijack old threads by posting a new question (or answer) as a reply to an old one

check the rules before you try to talk tough

You don't have any right answer of your own

and I wouldn't bet on that either :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.