Search:

Type: Posts; User: Junky

Search: Search took 0.11 seconds.

  1. Replies
    5
    Views
    1,363

    Re: Problem with subclass and superclass methods

    Of course they work because a method called area that has no parameters exists. A method called getName that has no parameters exists. What doesn't exist is a method called showStyle that has one...
  2. Replies
    5
    Views
    1,363

    Re: Problem with subclass and superclass methods

    It has nothing to do with if you have parameters or not. What is does have to wdo with is if the parameters match.

    class Foo {
    public void methodOne() {
    System.out.println("Lime");
    ...
  3. Replies
    5
    Views
    1,363

    Re: Problem with subclass and superclass methods

    System.out.println("Style is " + showStyle(shapes[i]));

    On that line you are calling the showStyle method and passing a single parameter. The only showStyle method I can find in your code has no...
Results 1 to 3 of 3