posted 17 years ago
class A {
static void hi(){} // version 1
final static void hi(){} // version 2
}
class B extends A {
static void hi() {} // new version
}
So the new version in B will hide the version in A. That is:
1. If you don't define the "new version" in B, and you call B.hi(); you get version 1.
2. If you define new version in B, you call B.hi(); you get the new version.
3. If instead of version 1 you sub in version 2 in A, then compiler will not allow you to define a "new version" in B. try it.