private void buildPersonOptions(){
        List<Person> personList= null;

I put this code in and it asked to import the class Person.
as far as I know there is a null list(personList) of the type List.
why is the List have this thing?
<Person> is what?

Edited 3 Years Ago by Dani: Formatting fixed

There is a null personList of type List, but you declare that the null personList List will have ONLY elements of type Person.
The personList maybe null, it is type List but you put "things" in the List. And you declare that when you are going to put things in the List the elements will be of type Person.

List<Person> personList= null;

Then somewhere else in the code:

personList = new ArrayList<Person>();
personList.add(new Person());

//the following is wrong:
personList.add(new String("Aaaaa"));
//you can put only Person objects in the List

But this would be correct:

List list = new ArrayList();

personList.add(new Person());
personList.add(new String("Aaaaa"));

But not recommended

I have another thread out there to. {primary key,and,Option[]}
could you look it over and see if it is answerable?
Thanks again

This question has already been answered. Start a new discussion instead.