Submitted Questions

  • Why its better to implement class with runnable instead of extending Thread class?

    Jay Bardia

    • Jan 8th, 2007

    Extending or Inheritance signifies a 'is a type' of relationship, if your class is not a 'type' of Thread then its a bad OO design if a class is extending from Thread, in that case implementing the Runnable interface gives the flexibility of multi-threaded functionality

    puneet mishra

    • Dec 23rd, 2006

    when we implement interface (runnable),i not getting extra overhead.but in case of extends class thead.then im getting overhead of the class.in java every class extends Object class(comic superclass) ...