Explain role of constructor in a java application?

Answer Posted / sonal

Without a constructor u cannot make an object or instance
of a class.
Every class must have a constructor. If no constructor is
provided the complier will provide default constructor at
run time.

Is This Answer Correct ?    33 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between static method and instance method in Java?

577


What are pass by reference and pass by value?

529


What is the difference between the final method and abstract method?

544


What is sortedmap interface?

560


What is a singleton factory?

516






Explain thread in java?

664


How are the elements of a gridbaglayout organized?

548


What are voids?

539


How do you take thread dump in java?

564


What is the mapping mechanism used by java to identify IDL language?

594


Is ++ operator is thread safe in java?

519


how to split string in java?

660


How does system arraycopy work in java?

585


What is map in java?

522


What is a linkedhashmap java?

561