// Introduction to Software Testing // Authors: Paul Ammann & Jeff Offutt // Chapter 7, section 7.1, page 242 import java.util.*; class f { public static void f (Stack s) { String s1 = "s1"; String s2 = "s2"; String s3 = "s3"; s.push (s1); s.push (s2); s.push (s3); g (s); s.pop(); s.pop(); // Oops! The stack is empty! s.pop(); } public static void g (Vector v) { // Remove the last element v.removeElementAt (v.size()-1); } public static void main (String []argv) { // Driver method for f // call f() Stack s = new Stack(); f(s); } }