It's not a secret anymore!
The moose likes Beginning Java and the fly likes dynamic casting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "dynamic casting" Watch "dynamic casting" New topic

dynamic casting

Christopher Au

Joined: Jul 26, 2007
Posts: 21

I was reading the following post

and in it a comment was about why dynamic casting was needed.

lets say you are using castor and you have generated some files which need to be loaded and instantiated so that you can use these classes immediately. Would dynamic casting be of use in this situation.

Hope this does not sound like a complete idiotic question.


Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15087

There really is not something called "dynamic casting". Did you read the replies in the other thread; especially Peter Chase and Ilja Preuss explain it well.

Can you post some code to show what you mean exactly by "dynamic casting" and how this is different from a normal cast?

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: dynamic casting
It's not a secret anymore!