public void printContact()
{
System.out.println("Name = " + name);
System.out.println("Last Name = " + lastname);
System.out.println("Address = " + address);
System.out.println("E-mail = " + email);
System.out.println("Phone = " + phone);
System.out.println("Note(s) = " + notes);
}
ContactList con = new ContactList();
}
public class ContactList
{
public ContactList()
{
Contact c;
Contact[] array_list;
}
public void List(Contact size)
{
Contact[] array_list = new Contact[1000];
}
public void print()
{
int c;
Object array_list;
for (c = 0; c < array_list; c++)
{
System.out.println(array_list[c]);
}
}
public void NewContact()
{
}
public void sort()
{
}
}
First things first: Is there a main somewhere? It would be easier to see all your code because the way its written itll just make contact c and your contact array and exit
2)
public void printContact()
{
System.out.println("Name = " + name);
System.out.println("Last Name = " + lastname);
System.out.println("Address = " + address);
System.out.println("E-mail = " + email);
System.out.println("Phone = " + phone);
System.out.println("Note(s) = " + notes);
}
ContactList con = new ContactList();
}
I spy two many close brackets? it seems possible
public void List(Contact size)
{
Contact[] array_list = new Contact[1000];
}
I'm thinking you don't mean to pass a Contact object named size?? I think you want to pass an int that you would put where the 1000 is.
public void print()
{
int c;
Object array_list;
for (c = 0; c < array_list; c++)
{
System.out.println(array_list[c]);
}
}
i don't think that println will work. or atleast they way you think it will. You would want to use your printContact method and pass the contact array_list[c] to it. Then do array_list[c].name etc...
If you need more help, you can pm me. i threw together a quick program that'll do what i think your trying to do and i can give you more pieces of that if you need help.