Stack Help Needed Quickly Please !!!!!!!
Results 1 to 3 of 3

Thread: Stack Help Needed Quickly Please !!!!!!!

  1. #1
    Senior Member
    Join Date
    Jan 2004

    Stack Help Needed Quickly Please !!!!!!!

    Hi guys,

    Sorry to put you all on the spot like this, but does anyone know what the primitive methods in a stack (in java) are ? . oo ya and also what methods a complete stack should contain ?

    Any help would be great.

  2. #2
    Join Date
    Feb 2003
    Google usually helps

    If you make a class that accepts object's as a parameter for its methods it should be able to handle all primitive types (in wrapper form).

    Push (obj)
    Pop (obj)
    PeekTop (obj)
    isEmpty (boolean)
    clear (void)
    size (int)

    and you could use arrays or arraylists to implement those functions

    hope that helped a bit

  3. #3
    Senior Member
    Join Date
    Feb 2004

    Try out the java section of Just put "stack" (or whatever you want) into the search box at the top. PScode (Planet Source Code) has A LOT of code!! I did the search and it looks like there may be some stuff there that will help you.

    Good luck


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts