Sololearn: Learn to Code
+ 3
Explicit declaration means that you need to specifiy the type of a variable when you declare it, like int n = 5 or double d = 5.5. The variable will keep the specified type, so if you assign the value 8.2 to the variable n (which is an integer), the decimal places will be dropped and the integer value 8 will be stored in the variable. Implicit means that the interpreter determines the type of the variable automatically, so n = 5 will be an integer, n = 5.5 will change it to a float, n = 'hi' to a string etc.
9th Feb 2019, 11:50 AM
Anna - avatar