What are the different type of references in Java ?
What is a ClassLoader, when will you need one, what are the different types of class loaders in Java ?
What are the various aspects of Java that are NOT Platform dependent ?
What is the difference between extending the Thread Class and implementing Runnable.. No the answer is not that you can extend only one class :-)
If you have a Static Method in Java that is Synchronized, how is it different from a Synchronized method of an Object ?
What is the Time Lag between starting a Thread and the actual running of the new Thread ?
Subscribe to:
Post Comments (Atom)
1 comment:
"What is the difference between extending the Thread Class and implementing Runnable"
One thing is, it is always advised to implement Runnable interface rather than extending Thread , reason being there should always be 'is a' relationship between base class and super class.
Another thing might be while implementing Runnable we need explicitly instantiate new thread in start method which we don't have to do while implementing Thread class.
Post a Comment