new method "newMethod" for Stack.java