Results 1 to 4 of 4
Thread: Dynamic Binding
- 04-09-2008, 09:42 AM #1
Member
- Join Date
- Apr 2008
- Posts
- 91
- Rep Power
- 0
- 04-09-2008, 10:32 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
How did you get that output. There should be a filed hiding. You use the same filed name on Sub and Super classes and use the same variable name. If you are working on a Java IDE you should notice it.
So, since you use the sup object reference with the Super class you definitely get the result is 100. It never refer the variable a of the class Sub.
Hope it's clear to you.
- 04-09-2008, 10:52 AM #3
Member
- Join Date
- Apr 2008
- Posts
- 91
- Rep Power
- 0
So, In Case Of Variable, no dynamic binding right?
- 04-09-2008, 11:17 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Dynamic DecimalFormatter
By felixtfelix in forum New To JavaReplies: 0Last Post: 03-17-2008, 04:16 PM -
Help for dynamic classes
By Bender in forum Advanced JavaReplies: 1Last Post: 12-19-2007, 08:46 PM -
how to generate dynamic pdf
By valery in forum Advanced JavaReplies: 1Last Post: 08-06-2007, 10:01 PM -
problems with Dynamic Xml
By boy22 in forum XMLReplies: 1Last Post: 07-24-2007, 12:10 AM -
dynamic update in swt
By sandor in forum SWT / JFaceReplies: 0Last Post: 05-14-2007, 08:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks