Ø
Øyvind
I have a hashmap.
The class 'Person' has two subclasses named 'Man' and 'Woman'. If I put for
example an instance of Woman into the hashmap. --> myhashmap.put(key,woman)
and get it later by using Person person = (Person) myhashmap.get(key)
will I then get the data for Woman too, or do I only get the data for
Person?
The class 'Person' has two subclasses named 'Man' and 'Woman'. If I put for
example an instance of Woman into the hashmap. --> myhashmap.put(key,woman)
and get it later by using Person person = (Person) myhashmap.get(key)
will I then get the data for Woman too, or do I only get the data for
Person?