Differentiate constructor and a method and how are it be
used?

Answer Posted / janet

Constructor will be automatically invoked when an object is
created whereas method has to be called explicitly.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

v-model life cycle

1618


State the main difference between c++ and java?

587


Why can't we override private static methods?

513


What do you mean by aggregation?

561


Why java is a platform independent? Explain

529






What does function identity () do?

515


What are the 3 types of control structures?

527


do I need to use synchronized on setvalue(int)? : Java thread

549


What is the use of math abs in java?

543


Difference between Preemptive scheduling vs. Time slicing?

565


What is the finalize method do?

594


What is a get method?

528


What is the default size of arraylist in java?

498


How many types of gc are there in java?

554


what is aggregation in java?

584