Dynamic keyword in Java

我只是一个虾纸丫 提交于 2020-06-27 15:16:27

问题


Is there a dynamic keyword in Java or a keyword which is similar to the dynamic keyword of C#


回答1:


No, there's no such thing in the Java Programming Language; it is a strictly statically typed language. There are, however, other programming languages that target the JVM, such as Groovy, that do indeed support dynamic typing.




回答2:


No, not that I know of, but having said that, there are other languages supported by the JVM that do use dynamic typing, such as Jython and I believe Groovy, and so it is possible to have your cake and eat it too, just not the particular flavor of cake that you requested above.



来源:https://stackoverflow.com/questions/7050288/dynamic-keyword-in-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!