| Author |
Explanation for the statements
|
Sathya Shanmugam
Ranch Hand
Joined: Mar 02, 2007
Posts: 45
|
|
Hi friends Pls give some detail explanation with example for the following statements from KB book " A Single object can be referred to by reference variable of many different types - as long as they are the same type or a super type of the object"
|
 |
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
|
|
Consider this example. There is only one D object created, but it can be referred to as an A, a B, a C, or a D.
|
 |
Sathya Shanmugam
Ranch Hand
Joined: Mar 02, 2007
Posts: 45
|
|
|
thanks Keith, now I understood the statement clearly with your example.
|
 |
 |
|
|
subject: Explanation for the statements
|
|
|