There is something surprising in the following code. The ListCell
class is not abstract, but we were able to create an anonymous class from it and override its method! How is this possible?
ListCell<TodoItem> listCell = new ListCell<>() {
@Override
public void updateIndex(int i) {
super.updateIndex(i);
}
};