The inside of your for-loop does not make any sense at all to me. Could you perhaps make a comment about every single line and tell us exactly what you are trying to do and what your idea was?
if (n == index) { //this isn't returning the proper result. Its taking the topOfStack and not factoring in the index.
holder = theStack[topOfStack];
System.out.println("Holders" + " value is: " + holder);
theStack[topOfStack] = input;
}
}
theStack[topOfStack] = holder;
System.out.println("bottom is: " + bottom);
System.out.println("topOfStack is: " + topOfStack);
topOfStack++;