[4451] in java-interest

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

Re: interfaces

daemon@ATHENA.MIT.EDU (Ken Arnold - Sun Labs)
Thu Dec 28 16:13:28 1995

Date: Thu, 28 Dec 1995 14:32:07 -0500
From: arnold@suneast.East.Sun.COM (Ken Arnold - Sun Labs)
To: pat@icon-stl.net
Cc: java-interest@webrunner.neato.org

>From pat@icon-stl.net:
>Does it matter if the parameters are polymorphically assignable?  Are you
>saying that Java allows covariant argument matching on the implementation
>of methods which occur in multiple interfaces?

I was being overprecise and made an error.  You are correct.  Sorry
about spreading misinformation.  You can have two methods that differ
only in type in two interfaces and still implement both.  Now that you
cannot override a method and provide a more-extended return type than
in the original method, the methods in the two interfaces cannot differ
at all in return type if your number and types of parameters match.

You still have the problem with having compatible throws clauses,
however.

		Ken
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

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