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

Answer Posted / devarathnam c,kotagudibanda(po

Hi...
Constructor(): It is also a method but it doesnot allow
return type even void also.It will call automatically
whenever an object is created of a appropriate class.
But class name and constructor should be the same.d
Method():U have to call explicitly .

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best definition for data?

517


Can we catch more than one exception in a single catch block?

624


Explain tree set and its features?

597


What is java oops?

551


What is member in java?

492






What are the benefits of operations?

509


why using interface interface ?

1504


What is stream api in java8?

535


Is string a data type in java?

590


What are the ways to instantiate the class class?

595


Do you know why doesn't the java library use a randomized version of quicksort?

552


Explain jdk, jre and jvm?

567


What do u mean by variable?

562


What is meant by binding in rmi?

546


Name and explain the types of ways which are used to pass arguments in any function in java.

564