Physics, asked by rock82499, 4 months ago

What is the function of Constructor?​

Answers

Answered by Anonymous
3

Answer:

The purpose of constructor is to initialize the object of a class while the purpose of a method is to perform a task by executing java code. Constructors cannot be abstract, final, static and synchronised while methods can be. Constructors do not have return types while methods do.

Answered by vaishnavibaggani301
0

Answer:

the purpose of constructor is to initialize the object of a class while the purpose of a method is to perform a task by executing java code.constructors cannot be abstract,final,static and synchronised while methods can be.constructors do not have return types while methods do

Similar questions