Discussion Forum : Introduction To Methods And Streams
Question -

Which of the following is a method having same name as that of it’s class?

Options:
A .  finalize
B .  delete
C .  class
D .  constructor
Answer: Option D

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.



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *