Search:

Type: Posts; User: curmudgeon

Search: Search took 0.10 seconds.

  1. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    Why on earth would you want to do that? What motivates this strange question?
  2. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    Read up on generics in the Java tutorial to see how and why they are used. Here it will allow you to create a compareTo method that uses a GreetingCard parameter as you've written it, but mainly they...
  3. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    Again the compiler is telling you exactly what is wrong. It's saying that compareTo must accept an Object parameter, while you've written it to accept a GreetingCard parameter. You can do one of two...
  4. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    The compiler is telling you exactly what needs to be fixed.

    Again, the compiler is extremely picky, and so you must be just as picky when you create your programs. Your errors are simply from...
  5. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    Please show your latest code attempt *with code tags* and in particular your compareTo method, the one that the compiler says is missing. And since that's the method the compiler complains about,...
  6. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    It's essentially the same problem. Again check spelling. Again check capitalization. This sort of thing should be automatic now when you receive these types of errors. You shouldn't need our help for...
  7. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    Re-read my post and then look carefully at the line that contains the error and it will become apparent. Remember that the Java compiler is unforgiving.
  8. Replies
    38
    Views
    3,551

    Re: Calling constructor error

    The compiler is telling you that you're trying to call a super constructor that doesn't exist, and the compiler is (as usual) in fact correct. Remember that constructors must be named *exactly* the...
Results 1 to 8 of 8