In what circumstances, compiler will supply a default
constructor for a class?

Answer Posted / uthrakumar-wipro technologies

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can arraylist contain null values?

561


How you can force the garbage collection?

533


Can we define constructor in inner class?

535


What is meant by binding in rmi?

539


Why is string class considered immutable?

593






what is the significance of listiterator in java?

611


What does i ++ mean in Java?

496


Why main method is static in java?

588


What are the topics in advance java?

505


What are dot operator queries?

621


How garbage collection is done in java?

542


Can an integer be a string?

505


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

583


Can we increase size of array?

562


How do you know if a value is nan?

559