File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Casting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Casting" Watch "Casting" New topic
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: 1505
    
    5

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, OCEEJBD)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Casting