| Author |
Casting
|
akila sekaran
Ranch Hand
Joined: Jun 12, 2012
Posts: 48
|
|
what will happen in this ?
|
 |
Panagiotis Kalogeropoulos
Rancher
Joined: May 27, 2011
Posts: 99
|
|
|
Have you tried it yourself? What do you think will happen and why?
|
 |
akila sekaran
Ranch Hand
Joined: Jun 12, 2012
Posts: 48
|
|
|
Class cast exception ;-)
|
 |
Anayonkar Shivalkar
Bartender
Joined: Dec 08, 2010
Posts: 1295
|
|
akila sekaran wrote:Class cast exception ;-)
So, what are you casting into what? Please take a close look at your code (by the way, it also contains a compilation error, which I believe might be a typo during pasting the code).
Hint : All Managers are Employees - but can you cast an Employee to Manager?
|
Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD)
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Casting
|
|
|