do
ArrayList<ArrayList<URL>> announces = new ArrayList<ArrayList<URL>>();
Using interfaces for variables is nonsense. Obviously, you are going to insert material into it, do yourself a favor, use the exact types, and you will be happy. (You cannot paste)
Now, if we expose this thing, for example, return it from a method, then it becomes a problem what the correct type should be. List<List<URL>> is perfect. List<? extends List<URL>> List<? extends List<URL>> You stoned.
Is it possible to return the previously declared announces as List<List<URL>> ? Of course, why not. Just do the actors, we know it's safe. What if the caller inserts a LinkedList<URL> into it? Who cares?
irreputable
source share