Answers for "int cannot be dereferenced???"

5

int cannot be dereferenced???

Primitives (byte, char, short, int, long, float, double, boolean) are not 
objects and do not have member variables or methods. They're just simple values.
So you cannot do somePrimitive.something() . So in the above example, x is an 
int, a primitive, and therefore cannot be dereferenced - meaning x.anything is 
invalid syntax in Java.
Posted by: Guest on August-03-2020

Code answers related to "int cannot be dereferenced???"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language