'static method'에 해당되는 글 1건

  1. 2011.11.14 Java에서 static method가 오버라이드 될 수 없는 이유
출처: http://stackoverflow.com/questions/2223386/why-doesnt-java-allow-overriding-of-static-methods

Overriding depends on having an instance of a class. The point of polymorphism is that you can subclass a class and the objects implementing those subclasses will have different behaviors for the same methods defined in the superclass (and overridden in the subclasses). A static method is not associated with any instance of a class so the concept is not applicable.


  
 «이전 1  다음»