Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic keyword in Java

Tags:

java

dynamic

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

like image 481
Anubhav Ranjan Avatar asked Dec 30 '25 11:12

Anubhav Ranjan


2 Answers

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.

like image 122
João Silva Avatar answered Jan 02 '26 00:01

João Silva


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.

like image 36
Hovercraft Full Of Eels Avatar answered Jan 01 '26 23:01

Hovercraft Full Of Eels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!