Array Stack help
807605Mar 16 2007 — edited Aug 30 2007learning stacks in my java class.
have an assignment with some questions.
please someone correct me if im wrong, but when you push a number into a stack it goes into an array bassicaly..now does that start at index 0? i mean the first open slot?
cause if im thinking right the question im givin is that:
Convention 1: We store items at the low end, starting at index 0(to my knowledge that would be the begging of the array) We use the variable count which equals the number of items on the stack.
sample questions being asked::
-Write the code for isEmpty() - I put public boolean isEmpty()
am i on the right course or is it asking the actual code used to find if it is empty in the code?