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...
Type: Posts; User: andreas90
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...
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;
...