//static variables
access by class name
class three
{
static int a=10,b=10;
void m1()
{
int a=10, b=10;
System.out.println(a+b);
}
public static void main(String args[])
{
three t1=new three();
t1.m1();
System.out.println(three.a+b);
}
}
Sample output: