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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   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
Explain, why the constructor is required in implemented 
class?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Explain, why the constructor is required in implemented class?
Answer
# 1
constructor is used for initializing the class 
variables.if constructor is not there,variables might be 
taken the garbage values.To avoid garbage 
values ,constructor is used.
        
Example:
 Java:
        int i;
    
        initial value i=0;

C:
        int v;
        v=8823
 
Is This Answer Correct ?    2 Yes 0 No
Vimalan
 
  Re: Explain, why the constructor is required in implemented class?
Answer
# 2
Constructor is like a method.It can be invoked as soon as 
we create an object for the class.We can overload 
constructor.to call them we need pass parameters in main 
method.
 
Is This Answer Correct ?    0 Yes 1 No
Sekhar
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is the difference between the >> and >>> operators?  1
Can we declare an anonymous class as both extending a class and implementing an interface? Wipro7
where do we use init()  2
what models are available for event handling?  1
what is prepare statement? what is calabedtarement? Symphony1
Difference between String & StringBuffer Wipro6
Difference String and String Buffer  3
What is means by DLL file means ? What is the use of DLL file? What are the contents of DLL file?  2
What is left shift and right shift?  1
how to compile jsp? Logica-CMG3
Where the CardLayout is used?  1
Name the types of mouse event listeners ?  2
Is java is a fully object object oriented language? TCS15
Why to give the file name same as the public class name in java?  3
what is the difference between HashMap And HashTable? Hexaware3
wht is mean by dirty read?  1
what is the difference between pagecontext and servletcontext? JBA-Infotech4
Is there any use of an abstract class which has no methods and no attributes? Wipro1
What is the superclass of exception?  2
what is the difference b/w design pattern and architecture Covansys2
 
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