InterviewSolution
Saved Bookmarks
| 1. |
Can A Constructor Have Different Name Than A Class Name In Java? |
|
Answer» Constructor in Java must have same NAME as the CLASS name and if the name is DIFFERENT, it doesn’t act as a constructor and compiler thinks of it as a normal method. Constructor in Java must have same name as the class name and if the name is different, it doesn’t act as a constructor and compiler thinks of it as a normal method. |
|