aspose file tools*
The moose likes Beginning Java and the fly likes abt Cast Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "abt Cast" Watch "abt Cast" New topic
Author

abt Cast

Rohit Kumar
Ranch Hand

Joined: Sep 20, 2007
Posts: 53
When i cast any object to other class at that time in memory whether one object is created or two?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Yogesh G",

Please check your private messages.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Originally posted by Yogesh G:
When i cast any object to other class at that time in memory whether one object is created or two?


You cannot cast an object. You can cast an object reference. Casting does not create any objects at all. Neither does it change any objects at all.

While I'm here, "abt" isn't a word. Please UseRealWords.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
 
jQuery in Action, 2nd edition
 
subject: abt Cast