title: How do I return a Vector java
body: <p>How do I return a vector in a java function. I want to unserialize a vector loaded from a file and return in a function but I get errors. This is what code I currently have.</p>
  
  <pre><code>    private static Vector&lt;Countries&gt; loadOB(String sFname) throws ClassNotFoundException, IOException {
          ObjectInputStream oStream = new ObjectInputStream(new FileInputStream(sFname));
          Object object = oStream.readObject();
          oStream.close();
          return object;
      }
  </code></pre>