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
In what circumstances, compiler will supply a default 
constructor for a class?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: In what circumstances, compiler will supply a default constructor for a class?
Answer
# 1
If no constructors are explicitly defined for the class,
Java supplies a default no-arg constructor which does
nothing more than initialize the fields of the class to
their default value.
 
Is This Answer Correct ?    0 Yes 0 No
Ranganathkini
 
  Re: In what circumstances, compiler will supply a default constructor for a class?
Answer
# 2
if there is no constructor was defined explicitly it will 
define the default constructor...the logic in this was we 
are creating a constructor with out our knowledge while 
creating an object as follows....

        <classname> <obj>=new <classname()>------this is 
the constructor we are defining .............
 
Is This Answer Correct ?    1 Yes 0 No
Uthrakumar-wipro Technologies
 
 
 
  Re: In what circumstances, compiler will supply a default constructor for a class?
Answer
# 3
when ther is no other constructor defined
 
Is This Answer Correct ?    0 Yes 0 No
Ravikiran
 
  Re: In what circumstances, compiler will supply a default constructor for a class?
Answer
# 4
If there is no constructor in the class , then the compiler 
create a default constructor with access specifier of class.


 class A{ }  - compiler create default constructor for this 
class.
 
Is This Answer Correct ?    0 Yes 0 No
Vijayakumar Chinnasamy
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
how can i cal servlet from jsp page?how can i pass variablesfrom the jsp that servlet can access? Verizon1
I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do? KPIT3
what modifiers are used with top-level class?  2
What is the difference between Stream Reader and Stream Writer?  4
how can we use the servlet as standalone apllication?should we need to extend any class? Logica-CMG2
Is there any need to import java.lang package? Sun-Microsystems9
how to call a method in different package?  4
Which method is used to find that the object is exited or not?  1
What is the specification of ?CODEBASE? in an applet?  1
When finalize method is called?  3
different types of threads? TCS7
what is bytecode ?explain in detail and watz the difference between bytecode and machine code? Lucent3
Can multiple catch statements be used in exceptions ? Wipro4
How to add panel to a Frame?  2
What is an event?  1
How to make a class immutable? Bosch6
How many bits are used to represent unicodde,ASCII,UTF-16 and UTF-8 characters?  2
without using arthematic operation ,how can you write the logic for adding/substraction/multiplication? Wipro4
What are the interfaces defined by Java.lang package?  1
What is the catch or declare rule for method declarations?  1
 
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