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   To Refer this Site to Your Friends   Click Here
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 buddy, well i got that there is always a default
constructor with abstract class. OK. But why not with interface?

Thanks in advance.
 Question Submitted By :: Tanzeem.akhtar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.
Answer
# 1
yes it is bcz interfaces are not part of the inheritance tree.

after all u can define a contract between 2 different parties
using interfaces nothing more u can expect. its not actually
an executable construct
 
Is This Answer Correct ?    1 Yes 0 No
Madhu
 
  Re: Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.
Answer
# 2
Just a samll correction... Interfaces are part of 
inheritance tree.
Inheritance is identified by both extends and implements 
keywords.

Regarding the default constructor.. All the classes which 
extend Object class will have a default constructor.

As we all know any interface cant extend Object class.. 
Interface cannot have default constructor.
 
Is This Answer Correct ?    0 Yes 0 No
Harsha
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Difference between array and arraylist. Sai-Softech4
Explain Connection Pooling?  3
What is a deadlock ?  5
wahts is mean by thread? HCL14
Can multiple catch statements be used in exceptions ? Wipro4
when we write class.forName("any one class"); what happens actually?what it will return?explain stepwise?  4
What is data abstraction? Elaborate with example? BMC3
what is the use of servlet engine? Photon2
what is synchronization  3
What is the preferred size of a component?  1
How to add two numbers with out using Arithmetic , union operators in java....? But we can use bitwise operators... but how...? CTS2
what is Thread?  6
What are the traverses in Binary Tree? Adobe2
When does the compiler supply a default constructor for a class? TCS8
What restrictions are placed on method overloading and method overriding?  3
what is struts-config-xml?and its use?  3
What is the difference between error and exception and explain in simple words not whatever is given in the book.  6
Can we access private data outside of the class directly in java programming language? Why There is no runtime checking in java, which leads to access the private data directly outside of a class? Google2
how to call a method in different package?  4
Is there is any error if you have multiple main methods in the same class? Wipro9
 
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