[2770] in java-interest
Re: AWT behavior
daemon@ATHENA.MIT.EDU (ser@jersey.uoregon.edu)
Fri Oct 13 00:22:04 1995
From: ser@jersey.uoregon.edu
To: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
Cc: java-interest@java.sun.com
In-Reply-To: flar@bendenweyr.eng.sun.com's message of Thu, 12 Oct 1995
19:23:44 -0700.
<9510130223.AA05518@bendenweyr.Eng.Sun.COM>
Date: Thu, 12 Oct 1995 19:32:49 -0700
flar@bendenweyr.Eng.Sun.COM said:
> > colorpoint r = new colorpoint(1, 2);
> > p=r;
> > /* Here's the funny part ******************************8*/
> p.equal(r); // calls point.equal, not colorpoint.equal
> System.out.println(String.newInstance(p==q)); } }
> Note that colorpoint.eq does not override point.eq since their
> arguments are different so they are different methods. What you want
> in colorpoint is:
But notice: r is of type colorpoint and the method with colorpoint as an
argument should be chosen. In any case, Java does not support this form of
differentiation; it's an implementation choice, probably because it's a lot
harder to implement.
--
Sean Russell \ It's OK to judge a book by its cover,
ser@cs.uoregon.edu \ as long as you understand that most of
http://zebu.uoregon.edu/~ser ) the cover artists
Finger Me for PGP Key / have never read the book.
NeXTMail Welcome!!! /
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com