This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serializable and Thread

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read following stuff on Sun's Website.




[ September 02, 2005: Message edited by: Chetan Parekh ]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic