In above application we created a new object(a1) for class A, then it is initialized to "null", even though i can call "a1.fun() & A.fun()" and i can initialize "a1.i = 100" and "A.i = 1000"
Even after object(a1) becomes null; a1.fun() and A.fun() calls the static method fun() successfully.
We initialized to a1.i = 100 and A.i = 1000;
For a1.i = 100 and A.i = 1000 it displays 1000 as output. I want to know how its behaves and why it displays the same value as 1000.
That's how static methods and variables work. They're shared between all members of the same class. As such, it doesn't actually matter that the reference is null, because for a static method or variable the reference type is all that matters.
Because of that, though, it's considered poor practice to use instances to call static methods. Using A.fun() and A.i is much better than using a1.fun() and a1.i - you should never see the latter style in real code.
(Please UseCodeTags in future - it makes your code easier to read. I've added them this time.)