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 is the symbol for line break?

606


Difference difference paint() and paintcomponent()?

530


Give an example of call be reference significance.

607


What are the differences between getting and load method?

540


What is difference between string and new string?

533






What is a ternary operator in java?

530


Can an integer be null java?

553


What is use of arraylist in java?

581


Differentiate jar and war files?

586


Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.

829


How to do encapsulation in java?

568


What is difference between equal and == in java?

518


What is a superclass?

920


How do you convert bytes to character in java?

531


How java is similar to c?

584