Start New Discussion within our Software Development Community

I cant see to figure out what im diong wrong here...
many errors

public class Card
{

		private String suit;
		private int face;


		public static void main(String[] args)
		{
		Card allSuit[] = new Card[4];
		for (int i = 0; i<allSuit.length; i++)
			{
				allSuit[i] = new Card();
			}
		allSuit[0] = new String("Clubs");
		allSuit[1] = new Card("Diamonds");
		allSuit[2] = new Card("Hearts");
		allSuit[3] = new Card("Spades");
		int[] numbers = new int[13];
			for (int i = 0; i<numbers.length; i++)
			{
				numbers[i] = i+2;
			}


		}

		/*public static void deal()
		{
			Card newCard = Card.deal();
		}*/


		//default construtor
		public Card()
		{
			setFace(4);
			setSuit("Hearts");
		}


		//copy constructor
		public Card(Card c)
		{
			setSuit(c.getSuit());
			setFace(c.getFace());
		}


		public Card(String st, int fc)
		{
			setSuit(st);
			setFace(fc);
		}


		//mutator method
		public void setSuit(String suites)
		{
			if (suites == "Hearts" || suites == "Diamonds" || suites == "Spades" || suites == "Clubs")
			{
				suit = suites;
			}
			else
			{

			}
		}


		public void setFace(int num)
		{
			if (num>2 || num<14)
			{
				face = num;
			}
			else
			{

			}
		}


		//accessor method
		public String getSuit() 		{ return suit; }
		public int getFace() 			{ return face; }


		//equals
		public boolean equals(Card c)
		{
			if (
				getFace() == c.getFace()	&&
				getSuit() == c.getSuit()
				)
				return true;
			else
				return false;
		} //end equals method



}
This question has already been answered. Start a new discussion instead.