Thread
with empty run
method is useless JAVA-W0084A thread was created using the default empty run method.
This method creates a thread with the default empty run
method. When this thread is launched, it will exit as soon as it is scheduled since there is no code to run.
Thread t = new Thread();
// The launched thread does nothing.
t.start();
Thread t = new Thread(
new Runnable {
@Override
void run() {
// ...
}
}
);
Make sure to provide a valid Runnable
instance to the Thread
constructor while initializing it.