允许以下内容: -
public interface JustImplementMe
{
public void ClimbMountain();
}
不允许以下内容: -
public interface StaticMethodInterface
{
public static void Climb();
}
允许以下内容: -
public class Classic implements JustImplementMe
{
public void ClimbMountain()
{
}
}
不允许以下内容: -
public class ClassicMusic implements JustImplementMe
{
public static void ClimbMountain()
{
// static method cannot hide the instance method in JustImplementMe
}
}
为什么会这样?感谢。