Andrei P Andrei P - 4 months ago 6
Android Question

Why can't I use intValue() in autocomplete?

As you can see in the picture below,

intvalue()
and also
tostring
don’t appear. If I type them manually, they are impossible to resolve. I’ve cleaned the project, reopened it, but nothing seems to resolve the problem. Anybody has an idea what’s wrong?
currentTemp
is a double.

<code>intvalue()</code> doesn’t appear

Answer

You've used double which is a so called "Primitive Data Type"

Change the dataType of currentTemp to Double (with a capital D) and .intValue() should become available.