Archived

This topic is now archived and is closed to further replies.

Typecasting in Java

This topic is 4985 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does this consume any resources? In principle, you should just be telling the compiler that the pointer is to be treated as Class X, instead of Object. At runtime, after all, what actually gets stored is just a list of ints, floats, and whatnot. But maybe there are issues I''m not aware of? In short, what are the pros and cons of typecasting? To win one hundred victories in one hundred battles is not the acme of skill. To subdue the enemy without fighting is the acme of skill.

Share this post


Link to post
Share on other sites