Using "instanceof"
They aren't 'identified by the JVM' at all. They're identified by the Java code, for example ObjectOutputStream, via the instanceof operator.
Q. What is maximum capacity of Hash Map ?
unlimited or until you get OOM error because hashmap bucket can be increase till 2^32-1. which is quite enough.