Which of the following methods of Thread class cant be overridden by its subclass.
-
suspend()
-
destroy()
-
resume()
-
stop()
In Java's Thread class, suspend(), resume(), and stop() are final methods and therefore cannot be overridden by subclasses. These methods are also deprecated in modern Java. The destroy() method is not final, so it can technically be overridden, though it's also deprecated.
suspend(), resume(), and stop() on Thread are legacy methods that were deprecated because they are inherently unsafe (they can leave shared data in an inconsistent state or deadlock monitors), so they are treated as not meant to be overridden or relied upon by subclasses. destroy() was never even implemented in most JVMs and behaves differently from these three, which is why it's excluded from this group.