Can a constructor have different name than a Class name in Java?

By drakula david in 22 Sep 2023 | 11:35 am
drakula david

drakula david

Student
Posts: 128
Member since: 22 Sep 2023

Can a constructor have different name than a Class name in Java?

22 Sep 2023 | 11:35 am
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

   - In Java, the constructor name must match the class name. You cannot have a constructor with a different name.


23 Sep 2023 | 04:14 pm
0 Likes

Report

Please describe about the report short and clearly.