If a variable is declared as public static varName;, then I can access it from anywhere as ClassName.varName. I am also aware that static members a
public static varName;
ClassName.varName
When in a static method you use a variable, the variable have to be static too as an example:
private static int a=0; public static void testMethod() { a=1; }