File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Serializable and Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Serializable and Thread" Watch "Serializable and Thread" New topic

Serializable and Thread

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
I read following stuff on Sun's Website.

[ September 02, 2005: Message edited by: Chetan Parekh ]

My blood is tested +ve for Java.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15084

Ofcourse you can, if you make a class that extends Thread and implements Serializable, you can serialize objects of that class. The article you refer to doesn't say it's impossible to serialize an object that extends Thread.

But it doesn't make much sense to serialize a thread-like object. Serialization makes sense for classes that are containers of data, not for "live" objects like threads, sockets etc.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Serializable and Thread
It's not a secret anymore!