title: Implementing a Stack<E> using Vector<E>
body: <p>I am using a Stack in the following way... I have problem here in line 26:</p>
  
  <pre><code>import java.util.Vector;
  
  public class Stack&lt;E&gt; {
      private Vector &lt;E&gt; v=new Vector &lt;E&gt;(1);
      public int getSize() {
          return v.size();
      }
  
      public boolean isEmpty() {
          return (v.isEmpty());
      }
  
      public E getTop() {
          return v.lastElement();
      }
  
      public E pop() {
          E p;
          if (!isEmpty()) {
              p = v.lastElement();
              v.remove(v.size() - 1);
          }
          /*return p; what to do here?? when stack is empty how to return and what to?* /
      }
  
      public void push(E p) {
          v.add(p);
      }
  }
  </code></pre>