Computer Science, asked by srushti200496, 10 months ago

what is a constructor in java​

Answers

Answered by jainmayank81
0

Answer:

Constructor is a block of code that initializes the newly created object.

A constructor resembles an instance method in java but it's not a method as it doesn't have a return type.

Constructor has same name as the class and looks like this in a java code.

I hope it helps you

Similar questions