I'm trying to add all the elements of an ArrayList into another ArrayList,
I've tried using
if (!listTwo.isEmpty()){
finalList.addAll(listTwo);
}
finalList.addAll(listTwo);
However, this keeps sending me an NullPointerException error. Both are ArryList, and listTwo does have elements inside of it.
Any idea why it's sending this exception? Thanks a lot