Let's say you have two lists declared:
ArrayList listA = new ArrayList();
ArrayList<Book> listB = new ArrayList<Book>();
And then you have these statements:
Object obj = listA.remove(2);
Book bk = listB.remove(2);
String str = listA.remove(1);
Assuming there is an object in each of the specified locations, why would you want to assign these methods to a variable, and what would be consequences of it? I have read this chapter like three times, and I still don't understand this. What am I missing?