In object-oriented paradigm, a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a f
An abstract class in Java is nothing but the pure virtual method equivalent to C++.
A class is not a method. An abstract class doesn't have to have "virtual" or abstract methods, or even any methods.
Something C++ developers put down Java features as just like C++ renamed without understanding the differences. ;)
Why do we say that a static method in Java is not a virtual method?
Not sure who says this, but static
methods are not polymorphic.
Even if we can override the static method
We can't, you can only hide or overload a static method.
Whether you use the class or sub-class or instance to invoke a static method the actual class or instance is ignored. e.g. you can do
((Thread) null).yield();