why the constructor should be used in class,if there is no
constructor what will happen?

Answer Posted / devarathnam c,kotagudibanda(po

Hi... Nothing will happen the compilet will supply the
default constructor of the class.Normally canostructor can
be used to instantiate an object.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is constructor and its types?

533


What is the difference between processes and threads?

529


What are the major drawbacks of external iteration?

566


I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?

687


When should the method invokelater() be used?

577






Can we extend private class in java?

542


what is mutual exclusion? : Java thread

550


What is the difference between path and classpath variables?

518


What is the difference between error and an exception?

563


What is runtime polymorphism or dynamic method dispatch?

514


Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example

2128


What is equals method in java?

520


How do you write a good declaration?

485


How big is a 32 bit integer?

522


Why do we need data structure in java?

565