1
$\begingroup$

Java seems to be categorized as a statically-typed language [1], but I'm wondering if it would be accurate to describe it as generally statically-typed but having some dynamic typing because of the run-time type checks performed when downcasts are performed.

$\endgroup$
2
$\begingroup$

Yes, that would be accurate. Also, array writes involve a runtime type check, to deal with problems associated with covariant array types.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.