[2589] in java-interest

home help back first fref pref prev next nref lref last post

Re: Problems with Method names

daemon@ATHENA.MIT.EDU (Laura Lemay, Killer of Trees)
Thu Oct 5 17:05:28 1995

Date: Thu, 5 Oct 1995 12:04:32 -0800
To: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff), sreenu@actor.cs.vt.edu
From: lemayp@lne.com (Laura Lemay, Killer of Trees)
Cc: java-interest@java.Eng.Sun.COM


>It is allowed, but B.meth is not overriding A.meth because the
>arguments are different. Java does not support contra/co-varient
>typing of arguments in overloaded method.

Um, I'm confused what this means.  I thought Java did have argument
polymorphism, but this seems to imply that it doesn't.  But there
are lots of examples in the Java source code that define methods
with different signatures....

Oh, wait a minute, does this mean that

A.  You can define your own new methods to have the same name but
multiple signatures, BUT

B.  You can't override existing methods to have different signatures
than those that already exist in subclasses.


??

Laura



-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post