Originally posted by Hasitha Randika:
...whats happening at line 9 and line 10
In line 9, a new instance of A is created, and a reference to this instance is assigned to the variable "obj" which has a type of Object. This is an "assignment conversion," in which the reference type is implicitly
upcast from type A to type Object.
In line 10, the reference held by "obj" is explicitly
downcast from type Object to type A (the true runtime type of the instance), and assigned to the variable "h" which has a type of A.
[ October 13, 2007: Message edited by: marc weber ]