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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -