Results 1 to 3 of 3

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

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    199

    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.
    Thanks
    -

  2. #2
    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
    Posts
    620
    Hey,

    Try out the java section of pscode.com... 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

    mjk

Posting Permissions

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