this code's output is B m() 5.But why it isn't B m() 6.i think p.m()will invoked B m() since B m() overrides A m().
SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right
dasun sam wrote:
this code's output is B m() 5.But why it isn't B m() 6.i think p.m()will invoked B m() since B m() overrides A m().
Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
BEE MBA PMP SCJP-6
OCPJP 6 95%
BEE MBA PMP SCJP-6
OCPJP 6
OCPJP 6
BEE MBA PMP SCJP-6
Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
OCPJP 6
OCPJP 6
BEE MBA PMP SCJP-6
BEE MBA PMP SCJP-6
The following compile-time information is then associated with the method invocation for use at run time:
(...)
• The result type, or void. (...)
OCPJP 6 95%
OCPJP 6 95%
Jim Hoglund wrote:Valentin's explanation above works for me. How about the rest of you?
Jim ......
OCPJP 6
dasun sam wrote:hello Valentin Musoiu!!!
it seems this is issue on compile time and run time.is this kind of problems are not related to the scjp 6.0 syllabus?
OCPJP 6 95%
OCPJP 6
SCJP6.0,My blog Ranchers from Delhi
BEE MBA PMP SCJP-6
BEE MBA PMP SCJP-6
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |