Search:

Type: Posts; User: BadgerWatch

Search: Search took 0.48 seconds.

  1. Replies
    4
    Views
    335

    Re: Cannot find symbol

    So how do I call SlotCollection properly now in another class?

    E.g I have "ground = new SlotCollection();" in another class, what do I need inside the ()?
  2. Replies
    4
    Views
    335

    Re: Cannot find symbol

    Oh wow, don't I feel silly now. Thanks!
  3. Replies
    4
    Views
    335

    Cannot find symbol

    Ok so, I can't figure out why my code is giving me the error message "Cannot find symbol - class slots"

    As far as I can tell I've defined the class haven't I?


    public class SlotCollection
    {
    ...
  4. Re: Troubles with toString and static and non-static

    I'm back -_-

    When I try to get the toString to return the "name" all it returns is null.



    import java.util.Scanner;
    public class Game
    {
    private int maxMoves;
  5. Re: Troubles with toString and static and non-static

    Oh of course. Yeah eventually, once I get the rest of the code up to scratch it is supposed to print out "Jack(0) #(1) @(2) %(3) $(4) Treasure/6\(5)" to show the player what the game situation is.
    ...
  6. Re: Troubles with toString and static and non-static

    Ok, that makes sense. If I remove that first line of code what do I need to change the "game1.toString(); line to for the method to actually run? That was where the static and non-static issues come...
  7. Troubles with toString and static and non-static

    Ok, in this assignment I have to write the code for a game that involves picking up and putting down stones in the right combination in order to unlock the treasure chest.

    We've been advised that...
Results 1 to 7 of 7