When I execute:
java B
for the next program, why is the main superclass A called? As I understand it, static methods belong to the class level.
class A
{
public static void main(String[] args)
{
System.out.println("A.main");
}
}
class B extends A{ }
source
share