Java a dynamic language? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Java a dynamic language?

What is meant by a dynamic language? Can you explain how does java characterize as a dynamic language?

27th Nov 2021, 2:26 PM
Ruchika Sehgal
Ruchika Sehgal - avatar
11 Answers
+ 1
Java is a static language. The language which needs to be declared before compilation is known as Static Language. ex-Java, C, C++. These are static languages. That means every time you create memory for variable or struct or object, you have to declare them first so that your compiler understands what kind of data and how much data it is going to store and then that memory for object will allocate during run time Languages ​​in which the allocation of memory is decided during run time and there is no need to declare variables are known as dynamic languages. ex-python
29th Nov 2021, 10:13 AM
Raisun Lakra
+ 1
Where did you see/read that statement? I'd like to see it to understand the rationale.
27th Nov 2021, 2:44 PM
Ipang
+ 1
In a book, can I send the image here somehow?
27th Nov 2021, 3:16 PM
Ruchika Sehgal
Ruchika Sehgal - avatar
+ 1
Upon a bit of reading, I just found out that Java (with Reflection) is considered a dynamic programming language. This topic appears to be related somehow to a language's type system, though not as closely. https://en.m.wikipedia.org/wiki/Dynamic_programming_language https://stackoverflow.com/questions/4913105/what-qualifies-a-programming-language-as-dynamic https://www.pcmag.com/encyclopedia/term/dynamic-programming-language
27th Nov 2021, 3:23 PM
Ipang
+ 1
In static language , compiler decides what amount of memory should be assigned to a variable during run time whereas in Dynamic languages allocation of memory is decided during run time
29th Nov 2021, 10:25 AM
Raisun Lakra
+ 1
raisun lakra thanks for the help!
29th Nov 2021, 3:52 PM
Ruchika Sehgal
Ruchika Sehgal - avatar
27th Nov 2021, 4:55 PM
Simon Sauter
Simon Sauter - avatar
0
Hmm
28th Nov 2021, 2:58 PM
Ruchika Sehgal
Ruchika Sehgal - avatar
0
Are C and Java dynamic languages?
28th Nov 2021, 2:59 PM
Ruchika Sehgal
Ruchika Sehgal - avatar
0
Ruchika Sehgal C and java both are static language
29th Nov 2021, 11:01 AM
Raisun Lakra
0
Oh okay
29th Nov 2021, 3:51 PM
Ruchika Sehgal
Ruchika Sehgal - avatar