At the moment i have an arraylist as so:

ArrayList<Client> clients = new ArrayList<Client>();

and I've filled this arraylist with the details of the clients themselves, including things like their name, address, salary, etc.

I can't seem to access the methods of the Client class from the ArrayList, all I end up with is an error when i try to do so. For example, I tried to access the address details of the first client in the arraylist as so:

clients.get(0).getAddress();

but this just gave me an error. Can someone please tell me what im doing wrong?