Frage

apologies if this is an easy question, I have a java class that implements Serializable

  public class product extends UnicastRemoteObject implements Serializable

I wish however to use threading within the same class, can anyone point me in the right direction please it would be much appreciated.

** apologies please notice the change above

War es hilfreich?

Lösung

You have two choices , either :

public class product implements Serializable,Runnable { }

or

public class product extends Thread implements Serializable {}

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top