Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8501613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:15:34+00:00 2026-06-11T01:15:34+00:00

I am currently working on a Poker java game exercise, and I get this

  • 0

I am currently working on a Poker java game exercise, and I get this ugly error which I’m not being able to understand. It must be some kind of syntax error since the compiler throws 100 of those. But I just don’t know where the error is??

import java.util.Random;

public class Poker
{
    private Card[] deck;
    private Card[] hand;
    private int currentCard;
    private int numbers[], triples, couples;
    private String faces[], suits[];

    private boolean flushOnHand, fourOfAKind, isStraight;
    private static final int NUMBER_OF_CARDS = 52;

    private static final Random randomNumbers = new Random();

    Poker()
    {
        faces = { "Ace", "Deuce", "Three", "Four", "Five",
            "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};
        suits = { "Hearts", "Diamonds", "Clubs", "Spades" };

        numbers = new int[ 13 ];

        deck = new Card[ NUMBER_OF_CARDS ];

        triples = 0; // right here's where the compiler starts complaining
        couples = 0;
            ...

though I am not able to spot any syntax error?

Btw, the Card is a separate class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:15:36+00:00Added an answer on June 11, 2026 at 1:15 am

    There’s no reason why the variable triples can’t be assigned where you are indicating the error.

    However, you need to assign the String arrays like so:

    faces = new String[] { "Ace", "Deuce", "Three", "Four", "Five",
             "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};
    suits = new String[] { "Hearts", "Diamonds", "Clubs", "Spades" };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a poker hand history parser as a part of
Currently working with converting SQLException error messages into messages that are more useful for
Im currently working on a game that uses multi touch to apply zoom to
I'm currently working on a small 2D game-engine in C++, but I am now
I am currently working on an application that should be able to detect wifi
I am currently working on a GPS tracking App (only the distance, not storing
I am currently working on an enterprise App being distributed via Ad Hoc. We
I'm working with some javascript code and I'd love to be able to get
I'm currently working through Thinking in C++, and chapter 9, exercise 15 gives instructions
(I do not have any dev android phone and currently working on emulator only.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.