Question: I have the below code:

```
 contacts = new Contact[] { 
      new Contact(0, "Mercury")
  };  
}

```

What I want to do is add values from a list of contacts, rather than Strings like Mercury!

How would I go about this?

Answer: 
Just use [List](http://docs.oracle.com/javase/1.4.2/docs/api/java/util/List.html)'s toArray method, and cast it appropriately:

```
Contact[] contacts = contactsList.toArray(new Contact[0]);

```

Taking another look at that, you will need to hand it a Contact[] (empty of course), for it to know what class type to be using. However, you do NOT need to cast.
If you have a `List<Contact> contactsList` with some data.

```
int size = contactsList.size();

Contact[] contacts  = new Contact[size];

for(int i = 0; i < size; i++ )
{
   // selection logic here--

   contacts[i] = contactsList.get(i);
}

```

Now you have a Array `Contact[]`.