Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tower's of Hanoi using Stacks - Java
#8
MoldyBunny Wrote:If I'm not wrong you create an array of Tower objects but don't initialize them. I'm gonna assume that's what causes the issue

public Tower[] t = new Tower[3]; is the initializer, no?
That creates three ArrayListStack's in each Tower object, since a Tower takes no parameters.

EDIT:
nvm didn't work
Reply


Messages In This Thread
Tower's of Hanoi using Stacks - Java - by XTOTHEL - 2012-03-10, 07:02 PM
Tower's of Hanoi using Stacks - Java - by XTOTHEL - 2012-03-10, 07:58 PM
Tower's of Hanoi using Stacks - Java - by XTOTHEL - 2012-03-10, 08:02 PM
Tower's of Hanoi using Stacks - Java - by Marksman Bryan - 2012-03-10, 08:18 PM
Tower's of Hanoi using Stacks - Java - by XTOTHEL - 2012-03-10, 08:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)