[Solved] Questions about a Java beginners [closed]


(1) What’s the meaning of this?

The method f is using instanceof as it is not use polymorphic methods to select the right type.

Can you be more specific as to what you don’t understand.

(2) How to call “yellow”?

I assume you want is to retrieve the String in the field in dog with dog.fieldNameNotShownInYourExample as it did in a.name to get the name.

(3) How to call “balck “?

I assume it should be "black" but its the same as 2)

0

solved Questions about a Java beginners [closed]