Hi,
Welcome to JavaRanch!
You
do need to know something about the "core
Java APIs," which certainly includes all the wrapper classes like Byte, Short, Character, Integer, Float, Double,Boolean, and Long, and other fundamental classes like
String and StringBuffer. It's enough to know that equals() is implemented sensibly for all of these classes.
You also need to understand -- and from your question, I don't know if you do or not --
polymorphism. A cast might change what the compiler can see, but it never changes what happens at runtime. If Long has its own equals(), then this is used even if the compile-time type of a reference is Object.