How heavy is a TypeCasting operation? Especially when I am doing Object typecasting? ex String s = (String)vector.elementAt(0); is efficient or String s = vector.elementAt(0).toString(); is efficient. Thanks in adv, Bye, Chinmay.
The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
posted 14 years ago
Casting is cheaper than most Method calls, but it has it's own set of problems. You might want to read Java performance programming, Part 2: The cost of casting from JavaWorld
"JavaRanch, where the deer and the Certified play" - David O'Meara