重複の可能性:
LinkedList iterator remove
private LinkedList flights;
...
public FlightQueue() {
super();
flights = new LinkedList();
}
...
public void clear(){
ListIterator itr = flights.listIterator();
while(itr.hasNext()){
itr.remove();
}
}
....
Exception in thread "main" java.lang.IllegalStateException
at java.util.LinkedList$ListItr.remove(Unknown Source)
at section1.FlightQueue.clear(FlightQueue.java:44)
at section1.FlightTest001.main(FlightTest001.java:22)
最初の itr.remove() でエラーが表示されます。