Java cast object to map. If I were to do: ChildA child = (ChildA)obj; .