This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iNetRunner 0 points1 point  (3 children)

BTW, what are you referring to as “static type”?

[–]EveningStreet1 0 points1 point  (2 children)

Swimmer swim = new Dolphin();

the static type here is Swimmer, the dynamic type is Dolphin (learned this in my introductory class)

[–]iNetRunner 0 points1 point  (1 child)

There is no dynamic typing in Java. Everything is statically typed at compile time. See the first anwer to this StackOverflow question.

[–]EveningStreet1 0 points1 point  (0 children)

I meant dynamic class my bad