How do i recognize constructor in java program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do i recognize constructor in java program?

Java

7th Jan 2020, 6:21 AM
Ahmad Zahidi Bin Azmi
Ahmad Zahidi Bin Azmi - avatar
2 Answers
+ 2
The constructor is a method that has the same name as the class where it is located.
7th Jan 2020, 6:31 AM
Tibor Santa
Tibor Santa - avatar
+ 1
And it doesnt have a return type
7th Jan 2020, 4:47 PM
Jnn
Jnn - avatar