Jump to content

Strings not being added to arraylist

- - - - -

  • Please log in to reply
3 replies to this topic

#1
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
nevermind I figured it out

Edited by noel222, 10 February 2012 - 02:27 PM.


#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
Your ArrayList is of type Player, not String, so it would contain Player objects, not String objects. Still, I don't think that's quite what you meant. How are you testing to see whether the players are in the ArrayList? I need to see more code to know what's going on.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
that is all the code I have so far. I am using the contains method to see if the array list contains the players and their nicknames.

#4
Norm

Norm

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 327 posts
Cross posted at: Strings not being added to arraylist




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users