Search:

Type: Posts; User: andreas90

Search: Search took 0.14 seconds.

  1. Replies
    11
    Views
    1,988

    Re: Trouble with an array

    What is contactType? Is it a String? If you define your contactList to store Contacts
    ie
    ArrayList<Contact> contactList = new ArrayList<Contact>(); then it can only store Contacts.
    In the...
  2. Replies
    11
    Views
    1,988

    Re: Trouble with an array

    Hello 93tomh!

    Yes, you can do that if the other class has access to the Contact class (if they are in the same folder). Example;

    class A { //like your Contact

    String aString;
    ...
Results 1 to 2 of 2