Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #31.8K
1 Posted Topic
I'm trying to make a deck of playing cards in Java, but when I run my code an error comes up saying java.lang.NullPointerException. This is my code: public class Deck { Card[] card= new Card[52]; Deck(){ for(int i = 0; i<13; i++){ card[i].value = i+1; card[i].suit= "Heart"; if(card[i].value==1){ card[i].value= 11; … |
The End.