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

What is the method overriding?

614


How many types of constructors are used in java?

534


How a string is stored in memory?

576


What is visibility mode?

527


Are there structures in java?

552






What is anagram word?

521


What is difference between final and immutable?

557


Can you make a constructor final?

575


Can we compare two strings in java?

554


How an object is serialized in java?

524


How many functional interfaces does java 8 have?

604


How does remove work in java?

517


what is synchronization and why is it important? : Java thread

584


What is the internal implementation of set in java?

504


Explain about field hiding in java?

526