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 indexof in java?

748


What two classes are used to read data only?

868


What type of variable is error flag?

840


Can singleton class be serialized?

743


Define immutable object?

861


Is oracle charging for java?

793


What is native method in java?

798


Explain static nested classes ?

831


Can you use abstract and final both with a method?

828


Which category the java thread do fall in?

772


What is the difference between yield() and sleep()?

784


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

826


What is a constructor, constructor overloading in java?

771


What is object class in java?

693


Why webdriver is an interface?

799