Hi All
I have a little confusion. I Know that we can not override a static method. It will give compilation error.But once i tried a program to override ,it was working fine.
So Please let me know where I am wrong.. Thanks in advance.
class A{
public static void itsMineMethod()
{
System.out.println("its mine work");
}
}
public class B extends A{
public static void itsMineMethod() //This is the overloaded method.
{
System.out.println("its mine inside CheckInterface");
}
public static void main(
String[] args)
{
//
}
}
How it is completely valid and will not give error..