static method query?

class A{ static void methodA(){ System.out.println("in methodA"); } public static void main(String ar[]){ A a1=new A(); a1.methodA(); //when we have to use this one A.methodA(); //when we have to use this one