ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Hi Friends, can you give difference between extending thread
class and implementing runnable interface.
 Question Submitted By :: Rajendra007
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Hi Friends, can you give difference between extending thread class and implementing runnable interface.
Answer
# 1
both will achieve the same functionality. Usually we implement runnable interface because if we extend thread and if we want to any application specific class, its not possible because java doesnt support multiple inheritance.
 
Is This Answer Correct ?    0 Yes 0 No
Murali.25
 
  Re: Hi Friends, can you give difference between extending thread class and implementing runnable interface.
Answer
# 2
By extending a thread class we will be restricted to the
implementation for single class only,by implementing
Runnable interface we will get extended for implementing
more than one thread
 
Is This Answer Correct ?    0 Yes 0 No
Ravikiran
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is difference between requestprocessor and request dispatcher? Tech-Mahindra1
StringBuilder s = new StringBuilder("Hello Mom");s.append(",I mean,Mother"); Response.Write(s.ToString()); String s = "Hello Mom"; s+ = ",I mean Mom"; Response.Write(s); Which is faster ? which uses the most memory?  4
how many ways to create Thread and which one is good? runnable interface ot Thread class? Satyam3
What is a Wrapper class?  9
What services that container provides?  1
What is OOP? BMC2
Write a program to create a binary Tree ?  1
What is hypertext?  1
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com  1
Linked List reverese program Bally-Technologies1
Describe inheritance as applied to java?  4
How are this and super used?  6
can u override the start() method of Thread class  4
how to minimize the functionality to will not force garbage collector?  2
String is a immutable objects . it means that string does not change........... But it will be chang......... { String s="kapil"; String s1="raj"; String s=s1; then print(.......) The String has been changed .. how it is possible and why its called immutable objects  3
Explain the difference between scrollbar and scrollpane?  1
what is the use of custom tags? with example? Photon1
What is anonymous class?  2
Explain pass by reference and pass by value? Wipro5
What is the frontend and backedn in Java? TCS2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com