J
jsc59
What actually happens in JVM code when you execute the following
-- snippet ------------------------------
Vector vec = new Vector()
MyClass a, b;
vec.add(a); ***
b = (MyClass)vec.get(0); ***
---------------------------------------------
Specifically in the last two (starred) lines, how are the casts to
Object and MyClass performed.
I'm trying to create a high performance java application and I need to
know if casts are prohibitively expensive.
Thanks,
-Jordan
-- snippet ------------------------------
Vector vec = new Vector()
MyClass a, b;
vec.add(a); ***
b = (MyClass)vec.get(0); ***
---------------------------------------------
Specifically in the last two (starred) lines, how are the casts to
Object and MyClass performed.
I'm trying to create a high performance java application and I need to
know if casts are prohibitively expensive.
Thanks,
-Jordan