Test Explanation for answer 2 : "Two methods having same parameters can't have different return types."
Is that the right/good explanation ? I think the good answer should be "can't compile" or the "Two methods can't have the same parameters in a class definition.
About Question enthuware.ocajp.i.v7.2.1008 :
Moderators: Site Manager, fjwalraven
-
- Posts: 33
- Joined: Thu Jul 18, 2013 6:06 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1008 :
You are right. The explanation has been enhanced to:
thank you for your feedback!You cannot have two methods with the same signature (i.e. same name and same parameter list) in the same class.
Note that return type and names of the parameters don't matter while determining the signature.
-
- Posts: 33
- Joined: Thu Jul 18, 2013 6:06 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1008 :

you're welcome
Who is online
Users browsing this forum: No registered users and 2 guests