What is the difference between method and constructor ?

Answer Posted / sukale shobha balshiram

A Method is set of data that perform specific task. it has
return type.but consturtor does not have return
type.consturtor name smae as class name.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main uses of java?

531


What is a list in java?

512


Which is bigger float or double java?

528


How long will it take to learn java?

511


Explain covariant method overriding in java.

547






What is mutable object and immutable object?

632


What is meant by flickering?

658


What is the disadvantage of synchronization?

567


What is the primary benefit of encapsulation?

562


What is foreach loop in java?

538


What is the difference between a local variable and an instance variable?

554


What are the different types of collections in java?

532


explain copyonwritearraylist and when do we use copyonwritearraylist?

549


Explain the difference between treeset and treemap in java?

536


What does the ‘static’ keyword mean? Is it possible to override private or static method in java?

567