myAge
can't take a String
-type value like "17"
myAge
needs to be a double
-type variablemyAge
is never declaredprint()
can't be used for integer valuesThat's right! myAge
was created as an integer variable, which means it can only take int
-type values.
Whoops! myAge
was created as an integer variable, which means it can only take int
-type values.