"no suitable method found for add()" error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: "no suitable method found for add()" error

  1. #1
    Join Date
    Apr 2014
    Posts
    1

    "no suitable method found for add()" error

    I'm getting that error in the title and I've never encountered it before can someone enlighten me on how to fix it

    Here's my first class: http://pastebin.com/rCaQa4Yd

    Here's my test class where the error resides: http://pastebin.com/t5L6Ummm

    The error is in line 31

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,423

    Re: "no suitable method found for add()" error

    If you want to store a Customer object in the arraylist, you need to declare the array as such.

    Rather than
    Code:
    ArrayList<String> customerList;
    try
    Code:
    ArrayList<Customer> customerList;

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center