saurav431's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
1 (0 per day)
Joined:
07-October 12
Profile Views:
292
Last Active:
User is offline Oct 07 2012 04:16 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   saurav431 has not set their status

Posts I've Made

  1. In Topic: Deck of cards using various methods

    Posted 7 Oct 2012

    View Posttownerj, on 02 May 2012 - 05:35 PM, said:

    public class Hand extends Deck{
    
    	private Card[] hand;
    	
    	public Hand()
    	{
    		Deck deck = new Deck();
    		for(int i = 0;i<=7;i++)
    		{
    			hand[i] = deck.drawFromDeck();
    		}
    	}
    	
    	public static void main(String[] args)
    	{
    		Hand d = new Hand();
    		System.out.println(d);
    	}
    }
    
    
    


    i am trying to create a hand class to draw seven cards and store them in an array of Cards
    and am not sure what is wrong i keep getting a null pointer exception. i am using the array List tutorial for
    my deck class.


    initialize your array hand in constructor hand()

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

saurav431 hasn't added any friends yet.

Comments

saurav431 has no profile comments yet. Why not say hello?