Sample code:
public class Server {
ServerThread
thread;
private ServerThread extends Thread {
public void run() {
Server.this.run();
}
}
public Server() {
if (thread == null) {
thread = new ServerThread();
thread.start();
}
}
public void run() {
....
}
Can somebody explain for me? or give me some tips. I don't know why the author start the server like this, what's the usage of the private inner class? Is there any advantage get from this?