KB book
1.
what does d1.name does ?
2.
can anyone explain why
#1
gives complie-time error
#2, works fine
#3
gives complie time error
3.In the last line of code,
The complier is comparing arthur length with clover length.
my question is why is it not comparing the length of name clover passed in the object (
new Dog("clover") with that kept in the hashmap.
the hashmap holds d1 with Dog key
where d1 is the key and Dog Key is the value.
here d1 is