T3.m1() cannot be fine since m1() is not a static method so it cannot be called in staitic way. Or I don't see the point here?T3.m1() is also fine because even though m1() is declared in T2 as well as T3 , the definition to both resolves unambiguously to only one m1(). Explicit cast is not required for calling the method m1() : ( ( T2) t).m1();
About Question enthuware.ocajp.i.v7.2.900 :
Moderators: Site Manager, fjwalraven
-
- Posts: 6
- Joined: Tue Nov 22, 2016 11:04 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.900 :
-
- Site Admin
- Posts: 10053
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.900 :
You are right the explanation is incorrect. It should say, "Having m1() in T3 is also fine...", which is what it is actually trying to get at.
thank you for your feedback!
Paul.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 33 guests