Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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: 15272
37
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic