> The API mentions nothing about how to terminate a
> thread. Currently when one of my threads get a
> message that it should stop working it just calls
> System.exit(0)...is that the preferred way?
No that's the worst possible thing to do.
Just exit your run method. A return statement would do. Or some other logic that just ends.
Don't use System.exit(0) for that. (and hardly for anything really)
> The API mentions nothing about how to terminate a
> thread. Currently when one of my threads get a
> message that it should stop working it just calls
> System.exit(0)...is that the preferred way?
That terminates the entire application - including any other threads that are running.
The vast majority of the time you do not want to do that.