Originally Posted by
BestJewSinceJC
Can you post the error you are getting? It should include the line number, method names, and error name... info that would be incredibly helpful in helping you.
when you put an item in the shelf, is done by push method, and then try to retreive the item, done by pop, i doesn't have error, only just print's stack empty.. because i did specify in the code that if empty print to console Satck is empty. the program continues to run.
ok w8, i got this recenlty
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at MStack.push(MStack.java:45)
at BookShelf.options(BookShelf.java:48)
at BookShelf.<init>(BookShelf.java:24)
at BookShelf.main(BookShelf.java:19)
Last edited by ezkonekgal; Jan 13th, 2009 at 12:02 am.