This article gives advice on using runtime class information in Java programs. It talks about the method area of the JVM and the structure of Java objects, upcasting and downcasting, polymorphism and dynamic binding, java.lang.Class and reflection, and -- perhaps most importantly -- reveals how best to ask a hippopotamus to dance.
Read this Artima.com article:
http://www.artima.com/designtechniques/rtci.html