/* * This was used in class to show inheritance. */ public class MyImprovedStack extends MyStack { public Object pop() { if (n <= 0) { return null; } return items[--n]; } public Object peek() { if (n <= 0) { return null; } return items[n-1]; } }