Search:

Type: Posts; User: Tolls

Search: Search took 0.03 seconds.

  1. Replies
    12
    Views
    3,610

    Re: Storing object with int values in Arraylist.

    And since you're trying to print the Gladiator objects you ought to do the last part of my original post and write a toString method that returns the attributes in a format to print somewhere.
  2. Replies
    12
    Views
    3,610

    Re: Storing object with int values in Arraylist.

    I'd write a no-args constructor:


    public Gladiators () {
    // either generate the attributes here or simple call getStats().
    }

    That way when you create a new Gladiator it will have all it's...
  3. Replies
    12
    Views
    3,610

    Re: Storing object with int values in Arraylist.

    Because you only calculate your attributes in the getStats method, which regenerates them everytime it is called.
    I would suggest using the constructor for generating the stats for the character,...
Results 1 to 3 of 3