Hey guys!
I finally figured it out, thank you so much for the help! apparently ListIterator() does not have a method called isEmpty though, so I still used the ArrayList itself. Anyway I honestly don't know exactly what was wrong, since it worked when I used a for-loop instead of the while-loop. I did however add a global boolean variable called exists to keep track of when to exit the for-loop and when to enter the following if-statement. I'm still using the recursion, since I think its kinda neat

Here is the working code:
Anyway thanks for the help! I will definitely continue using this forum when it comes to
Java programming, its been a very positive experience so far
Best Regards
Johan