Added some if statements to allow JavaStack to specifically check if pop and atIndex are working correctly in comparison to RubyStack.rb

Seems to be working,
SFH