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

Class casting and JVM

frank davis
Ranch Hand

Joined: Feb 12, 2001
Posts: 1479
When downcasting, Subclass = Superclass, what are the many steps occuring behind the scenes within the JVM ?
There is some overhead involved in this action that is best avoided, but I can't find any specific doc on what exactly is happening in the JVM. I don't need the opcodes, although that would be appreciated, but I do want to know each step that would represented by an opcode.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
You can get the op codes (or at least the byte codes) by using javap -c YourClass.
[This message has been edited by Marilyn deQueiroz (edited November 02, 2001).]


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
frank davis
Ranch Hand

Joined: Feb 12, 2001
Posts: 1479
Thanks again Marilyn.
Yes, the javap -c thing is cool and to get more detail on the byte codes see http://mrl.nyu.edu/~meyer/jvmref/ref-Java.html
although that link is a little old.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Another good link regarding bytecodes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class casting and JVM