Java primitives are not objects and have no member methods associated with them. However, they can be auto-boxed into wrapper classes such as Integer, Short, etc. These are full objects and have equals() overridden to compare state. You'll have to check the definition if a Short with value 32 is equal() to an Integer with value 32, I don't remember off the top of my head if this is true or not.
Strings are not primitives in Java, but full objects and have .equals() overridden correctly to compare state.