This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm doing my work for uni, which is just an ongoing project which we add to each week. This week we have to change one of the arrays to an ArrayList instead. What I'm having trouble with is calling methods with the ArrayList Object. Anyway I'll post the code which may explain it a little better. Line 69 on is whats giving me trouble.
So what I'm trying to do is call the getEmployees() and getSize() from the Office class. Now i could do this in the array buy just specifying an element in the array factoryOffice.getEmployees() would work, but not with the ArrayList.
Here's the methods in the office class. I get a method not found error.
An ArrayList<E> is a List<E>, so whatever you can do in the List interface you can do in the ArrayList class. Look up what Rob showed you, particularly methods of the List interface which might allow you to get something.