Trimble interview question

What is the difference between ArrayList and LinkedList and when will you prefer to use?