Is it compulsory that we should declare variable type unlike in python language? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is it compulsory that we should declare variable type unlike in python language?

Like python, we declare variable by age = 12

27th Apr 2019, 9:07 AM
Fabian Uzukwu
Fabian Uzukwu - avatar
1 Answer
+ 6
It depends on the language. In Python you don't have to, a lot of other languages like C, C++, C# or Java require a declaration by type.
27th Apr 2019, 9:13 AM
HonFu
HonFu - avatar