Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tower's of Hanoi using Stacks - Java
#9
Marksman Bryan Wrote: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

probably used the wrong terminology when replying, but basically you create an array of references but don't create the actual objects.
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 MoldyBunny - 2012-03-10, 08:21 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)