Search:

Type: Posts; User: jadeclan

Search: Search took 0.20 seconds.

  1. Replies
    5
    Views
    458

    Re: Incompatible types

    duh sorry for bothering you

    --- Update ---

    duh sorry for bothering you
  2. Replies
    5
    Views
    458

    Re: Incompatible types

    Using BlueJ --- the error message is simpy incompatible types

    and the variable sourceToAdd is highlighted in the if statement.

    tried to copy and paste, BlueJ wouldn't let me

    --- Update ---
    ...
  3. Replies
    1
    Views
    271

    Incompatible types

    In the method addNoDuplicateSources, the if statement has an error message - incompatible types.
    The input parameter to the method is a string and the return parameter from the getSource() method...
  4. Replies
    5
    Views
    458

    Incompatible types

    In the method addNoDuplicateSources, the if statement has an error message - incompatible types.
    The input parameter to the method is a string and the return parameter from the getSource() method...
  5. Re: Trying to create an array of stacks that contain objects

    Fishing for an aha moment (for me) in your last response, I tried changing the offending line to:
    piles.get(i).push(currentDeck.dealSingleCard());

    and

    tada no error

    you are a genius.......
  6. Re: Trying to create an array of stacks that contain objects

    the error says
    unexpected type
    expected: variable found: value

    The error occurs on the line:
    piles.get(i) = (Stack) piles.get(i).push(currentDeck.dealSingleCard());
    which is second to...
  7. Re: Trying to create an array of stacks that contain objects

    I actually tried that in my attempts (see below)

    and got an unexpected type in the body of the last for loop. (error message was: unexpected type required variable, found value)

    I also tried...
  8. Re: Trying to create an array of stacks that contain objects

    I read the theory and think I grasp what's been said, but I'm still left with the question: Do I need to create 17 stacks of different names rather than use an array/ arraylist/ list / other???? If I...
  9. Re: Trying to create an array of stacks that contain objects

    I did post the complete error message.... I will have a look at the theory stuff, to see if I can deciper it.
  10. Re: Trying to create an array of stacks that contain objects

    Sorry about that. Used tags, you're right it is a lot easier to read.
  11. Re: Trying to create an array of stacks that contain objects

    I have taken your advice and gone back to where I started, this is what I have:


    public class Solitaire_Engine
    {
    private Stack <Card> piles [] = new Stack <Card> [17];
    ...
  12. Trying to create an array of stacks that contain objects

    I have tried so many things, I am now thorougly confussed. I am trying to make an array of Stacks that will contain objects called Card. I need 17 stacks of cards. The currentDeck.dealSingleCard()...
Results 1 to 12 of 12