java - int cannot be dereferenced compilation error -
i getting error when try compile code saying
int cannot dereferenced
what causing it? here code using:
class { public static void main(string str[]) { int system=22; system.out.println(system); } }
by writing
int system = 22; you hiding class java.lang.system. when try do
system.out.println(... the compiler thinks want have access varilable out of int doesn't have primitive type.
you write
int system = 22; system.out.println(system); variable names should start lowercase anyways.
Comments
Post a Comment