Which three values will appear in the output?

Given: Which three values will appear in the output?

Given: Which three values will appear in the output?

A.
7

B.
a1

C.
a2

D.
b1

E.
b2

F.
5



Leave a Reply 7

Your email address will not be published. Required fields are marked *


hammedm

hammedm

D,E,F

bob

bob

@hammedm,
you’re wrong, E is not printed.
C instead.

ARJIT GAUTAM

ARJIT GAUTAM

b1,a2 and 5

leo yu

leo yu

http://ru.stackoverflow.com/questions/482974/java-%D0%BE%D0%B1%D1%80%D0%B0%D1%89%D0%B5%D0%BD%D0%B8%D0%B5-%D0%BA-%D0%BF%D0%BE%D0%BB%D1%8E-%D0%BF%D0%BE%D0%B4%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%B0-%D0%B5%D1%81%D0%BB%D0%B8-%D0%B5%D0%B3%D0%BE-%D1%8D%D0%BA%D0%B7%D0%B5%D0%BC%D0%BF%D0%BB%D1%8F%D1%80-%D0%BF%D1%80%D0%B8%D1%81%D0%B2%D0%BE%D0%B5%D0%BD-%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B5-%D0%BD%D0%B0-%D1%81%D1%83%D0%BF%D0%B5%D1%80-%D0%BA
http://stackoverflow.com/questions/8799018/inheritance-of-final-fields-in-java

(1) instance method could be overridden, in runtime, java detected that myA is of B type and invoking myA.doA
(2) class static method could be hidden but not be overiden, before runtime dynamic biding, compiler assigned the A.doA2 to myA.doA2
(3) instance variable could be hidden but not be overiden, before runtime dynamic binding, compiler assigned the A instance.a to my.a