Vidyalelo
Java Programming · Q24

Constructors and Methods

Programming · Java Programming · question 24

Q24

In Java, can a method have the same name as the class?

A.
Yes, it is a constructor
Answer
B.
Yes, it is a static method
C.
Yes, it is a public method
D.
No, it is not allowed

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board