Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.09 seconds.

  1. Replies
    10
    Views
    2,119

    Re: Java Stacks question

    That's really a question for your instructor, but the way I take it, the j in the question is just a temp variable name and has nothing to do with any 'j' values that happen to be in the stack. But I...
  2. Replies
    10
    Views
    2,119

    Re: Java Stacks question

    Sometimes the best way to figure that part out is to draw some examples. So say we have this as a stack:

    {1, 2, 3, 4, 5}

    ...and n = 3. What should happen?

    Well, first off, what is the 3rd...
  3. Replies
    10
    Views
    2,119

    Re: Java Stacks question

    Seems reasonable to me, but really, the best way to test is to simply let the code do the talking. It doesn't matter what we think, just what the program does. Try stepping through it with a debugger...
  4. Replies
    10
    Views
    2,119

    Re: Java Stacks question

    What happened when you tried exactly that?
  5. Replies
    10
    Views
    2,119

    Re: Java Stacks question

    Is this a different question than the one you posted here: Can somebody help me with stacks?

    Anyway, the best way to test this is to throw together a little example program that does exactly what...
Results 1 to 5 of 5