The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Name that tune

Posted by Jody Brown on November 28, 2001 at 2:45 PM

The problem is in the tune method defined in WindError. The tune method takes a parameter of type InstrumentX. Because there is no play method on InstrumentX that takes a NoteX, an error is thrown. An explicit cast is needed on the incoming InstrumentX object to cast it to a WindX object. Then you can call the WindX's play method.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us