It has nothing to do with generics. The error message is telling you exactly what's wrong.
At line 10 of WildcardDemo1.java, you're trying to access the first element (at index 0) of an ArrayList that has no elements.
Go back and read the docs for set() very closely.
And after you've done that, and understand why you're getting the error, change your code to not use set() or get() at all.
You should never use get() when iterating a List, and you can just use add() instead of set().
But you don't even need to do that:
The only caveat to these is that if you want dst to exactly match src when you're done, you'll need to call
dst.clear() first. And if you want dst to keep its original size but have the same elements as src for whichever indices they both have in common,
then you'll need to use set(), but you'll need to alter your approach so that you're not trying to put values in elements that don't exist.