I am getting a NullPointerException on the following code on the 2nd line of the snippet. I've tried looking it up online but can't fix it. If anyone could please help me it would be greatly appreciated!
for (int j=1;j<12;j++) {
while (!topCard.getCardDetails().toString().equals("")) {
hand1[j-1] = (String) topCard.getCardDetails();
}
topCard = topCard.getNextCard();
removeCard(topCard);
topCard = topCard.getNextCard();