why constructor dont have returns type?

Answer Posted / sushila

constructor does not have a return type. it is not executed,
while loading class into the memory.

constructor is executed only once for each object.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the purpose of garbage collection in Java?

571


Why do we use string?

581


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

755


How do you escape json?

542


What is static keyword?

591






What is the byte order of byte buffer?

563


How do you convert int to char in java?

573


What is java object name?

551


'A class is a template for an object' explain this statement.

546


What is the final keyword denotes?

675


Is there any sort function in java?

575


What is string intern in java?

550


Is a boolean variable?

521


Why can't we override private static methods?

520


what is the constructor and how many types of constructors are used in java?

536