I'm trying to write a program for the Blackjack game but I keep getting an error message saying "; expected" but I don't understand why a semicolon would be needed. The line of code that it occurred was: "boolean playBlackjack()"

Recommended Answers

All 3 Replies

And that is a method you are trying to declare or is it a variable you are declaring? Either way it looks to be an invalid statement. Is that the entire line of code?

That's a method I'm trying to declare, what makes it invalid?

Well, is there any body to the method? Does it have a valid return statement? Somewhere you have an incomplete statement or block and the compiler cannot parse it as valid.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.