Wednesday, January 6, 2010

Check out what the java compiler is doing to the class file...

with javap command!

*Slap *Slap

From Effective C++, by Scott Meyers :

"Anytime you find yourself writing code of the form "if the object is of type T1, then do something, but if it's of type T2, then do something else," slap yourself.

solution : overriding the method