Organizational Research By

Surprising Reserch Topic

Extends Thread class vs Implements Runnable Interface?


  • Extending the Thread class will make your class unable to extend other classes, because of the single inheritance feature in  JAVA. However, this will give you a simpler code structure. If you implement Runnable, you can gain better object-oriented design and consistency and also avoid the single inheritance problems.
  • If you just want to achieve basic functionality of a thread you can simply implement Runnable interface and override run() method. But if you want to do something serious with thread object as it has other methods like suspend(), resume(), ..etc which are not available in Runnable interface then you may prefer to extend the Thread class.
asked May 26, 2015 in Core java by rajesh
0 votes
116 views



Related Hot Questions



Government Jobs Opening


...