Static variables can't be local why ??

Because  In C and C++, you can have local static variables. The scope of such variables is the method they are defined in, but they continue to exist when the method ends. Next time the same method is called, such a variable will still have the value it had when the method was called the previous time. 
 Although Java took a number of features from C++, it isn't the same as C++, and this feature was left out. Probably the designers of the Java language didn't think this was a very useful feature to borrow from C++. So, This is not a feature that you really need, and it can be hard to understand. 


We can't override a static method by a non-static method why ??

Have a look at the below code...

class Parent
{
                   static void m1()
                           {
                                    System.out.println("static m1 in Test");
                            }
}

class Child extends Parent
{
                      void  m1()
                            {
                                      System.out.println("non static m1 in Test1");
                            }
}

class Demo
{
                  public static void main(String...args)
                            {
                                        Parent obj = new Child();
                                         obj.m1();          // Give Attention on This line

                            }
}

Now, picture is clear i think. Suppose compiler compiles this code without any problem then at compile time compiler checks the m1 method's availability and type in Parent class which is static Hence, changes obj to Parent (class name) .Its okay for now. Now you have your your byte code BUT at run time when JVM checks the object type it will call m1 method in the Child class but now the problem is obj (Refrence variable) have changed to class name Which is Parent (class name) and m1 method in the Child class is non-static then there will be a strange condition.
I think now it is clear that we can't override a static method by a non-static method & vice-versa .  

Why we always declare main method public ?

Because the rules of the JVM say that

Can We overload main method ??

Point here is that main() is no different from any other method.

Is it possible to override main method?

In Java we can not override a method which is static, but we can implement the method with the same name and parameters. This is called shadowing and not overriding.
Have a Look Here For A better explanation

what is the use of constructor inside abstract class

Instance of Abstract class cant be created but still there are few things that needs to be taken care:

In java, we have two compiler like HotSpot Client and Hotspot server compiler. Why we need two different types of compilers?

The "-client" mode will use the JIT compiler originally developed by Apple -- and it does a straight to native upon the class load. It is great for relatively short lived programs.

Why We declares main method always public ?

Because the rules of the JVM say that when it launches your program, it will look for a public main method in the class you give it.

Try To Predict Output--2


Test Your Java Fundamentals By Predict Its Output.......
Comment If you Like It........ 




class Scratch {
    public static void main( String[] args) {
        Parent p1 = new Parent();
        Parent p2 = new Parent();
        Child c1 = new Child();
        Child c2 = new Child();

Try To Predict Output--1

Guys Test Your Java Fundamentals By Try To Predict Its Output.
Comment Here If You Like It.....

class You{ 
static int i; 
static void method(){ 
System.out.println("Method in You "+i);}} 

More Than One Main Method...Possible ??

Yes, Of-course It Is Possible......
Have a Look At This Piece Of Code......
Please Comment If You Like It.......
******************************************************************CODE 
START********************************************************************* 
//Compile the Program. 
//Execute Class C.