Thread
:
Dynamic Binding
View Single Post
#
1
(
permalink
)
04-09-2008, 10:42 AM
javarishi
Member
Join Date: Apr 2008
Posts: 91
Dynamic Binding
I have two classes, Super and Sub
class Super{
int a=100
}
class Sub extends super{
int a=500;
}
class Test{
Super sup = new Sub();
S.o.p(sup.a)
}
The Output Is 100. Why In Case Of Variable JVM Does not find The SubClass One?
Sponsored Links
javarishi
View Public Profile
Send a private message to javarishi
Find all posts by javarishi