The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

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.

Message:

Re: Invalid Method Signature

Posted by Brian Sanders on November 26, 2001 at 5:47 PM


> why am i getting this message ???
>
> (THE FAULT IS IN THE NEXT LINE)
> stenaFerry.engageDrive(1);

The code you've posted will only work if the class carFerry has an overloaded method called engageDrive().

This means that there should be methods with the following signatures:

void engageDrive();

void engageDrive(int gear);

If you don't have both those methods, the above code won't compile.




Replies:

Sponsored Links



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