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 ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lexicographically smallest string?

812


What is difference between call by value and call by reference?

712


What is the difference between C++ and Java and your preferences?

849


please send me hr interview questions in it industry

1894


Can private class be inherited in java?

802


What is the purpose of abstract class?

714


Is string a class in java?

731


What is unicode used for?

817


Explain covariant method overriding in java.

783


What does localhost mean?

702


List some features of the abstract class.

787


Can a class have a static inner class?

816


Why should I use abstract class?

776


What methods are used in Servlet?Applet communication?

1922


What are the data types supported by java?

744