Why is Java Statically Typed?

A thought occurred to me a while ago, and since the initial thought, I haven't been able to shake it. Ergo, you, dear readers, can be my catharsis for helping me to rid myself of this thought once and for all.

I've not been able to figure out why Java is a statically typed language. There just doesn't seem to be much logic to why Java chose this path when it was created. Now, I'm not trying to start the usual Static vs. Dynamic typing wars (I understand both of those arguments quite well), but the argument of why Java eludes me. Since Java has the virtual machine (VM), it doesn't have the same reasons that C or C++ have for static typing (namely the type needs to conform to a physical piece of memory in some fashion). But, since Java has no such constraints, so the reasons for having static types in Java seem more a case of dogmatic adherence rather than anything technical. Now, this is also without much knowledge of how the Java VM really works. Is there something in the way the VM is modeled that causes static typing to be preferred (or even required?)

Inquiring minds want to know!

Comments !