Computer Applications
If a class is named DemoClass, what names are allowed as constructor names in the class DemoClass?
Java Constructors
3 Likes
Answer
The constructor can only have the name of the class in which it is defined. Thus, all the constructors of class DemoClass will be named DemoClass.
Answered By
2 Likes