Home » JAVA Programming » Methods » Question
  1. Which of the following is a method having same name as that of it’s class?
    1. delete
    2. constructor
    3. finalize
    4. class
    5. None of these
Correct Option: B

A constructor is a method that initializes an object immediately upon creation. It has the same name as that of class in which it resides.



Your comments will be displayed only after manual approval.