struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject Re: [OT] Use of Static Methods
Date Wed, 09 Jul 2003 19:10:28 GMT


Brian Lee wrote:

>> That's incorrect.  Static methods cannot be overridden.
> 
> 
> Actually, that's incorrect. Static method can be overridden.
> 
> foo.java
> public class foo{
> public static void bar(){}
> }
> 
> baz.java
> public class baz extends foo{
> public static void bar(){}
> }
> 
> compiles

Let's settle this before it gets stale:

Static methods are not overridden, they are *hidden*.

<http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#227965>


Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message