We help IT Professionals succeed at work.
Get Started

Syntax error on token ";", { expected in Eclipse

sethainsley
sethainsley asked
on
473 Views
Last Modified: 2013-12-15
This is in eclipse, I get the error message in the title when I attempt to compile.
public class Hand {
	
 
	private int numCards = 0;
	private String[] currentHand = new String[numCards];
	private int[] used = new int[10];
	String[] cards = new String[51];<---Error is here
	cards[0] = "2H";
	cards[1] = "3H";
	cards[2] = "4H";
	cards[3] = "5H";
	cards[4] = "6H";
	cards[5] = "7H";
	cards[6] = "8H";
	cards[7] = "9H";
	cards[8] = "10H";
	cards[9] = "JH";
	cards[10] = "QH";
	cards[11] = "KH";
	cards[12] = "AH";
	cards[13] = "2D";
	cards[14] = "3D";
	cards[15] = "4D";
	cards[16] = "5D";
	cards[17] = "6D";
	cards[18] = "7D";
	cards[19] = "8D";
	cards[20] = "9D";
	cards[21] = "10D";
	cards[22] = "JD";
	cards[23] = "QD";
	cards[24] = "KD";
	cards[25] = "AD";
	cards[26] = "2S";
	cards[27] = "3S";
	cards[28] = "4S";
	cards[29] = "5S";
	cards[30] = "6S";
	cards[31] = "7S";
	cards[32] = "8S";
	cards[33] = "9S";
	cards[34] = "10S";
	cards[35] = "JS";
	cards[36] = "QS";
	cards[37] = "KS";
	cards[38] = "AS";
	cards[39] = "2C";
	cards[40] = "3C";
	cards[41] = "4C";
	cards[42] = "5C";
	cards[43] = "6C";
	cards[44] = "7C";
	cards[45] = "8C";
	cards[46] = "9C";
	cards[47] = "10C";
	cards[48] = "JC";
	cards[49] = "QC";
	cards[50] = "KC";
	cards[51] = "AC";
	
	Hand(int handCount) {
		numCards = handCount;
	} 	
	
	public static void main(String[] args) { }

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE