1.

How Compiler And Jvm Can Differentiate Constructor And Method Definitions Of Both Have Same Class Name?

Answer»

By USING return TYPE , if there is a return type it is considered as a METHOD else it is considered as CONSTRUCTOR.

By using return type , if there is a return type it is considered as a method else it is considered as constructor.



Discussion

No Comment Found