title: How to get a specific type object from an Object Vector in Java
body: <p>I have the following <code>Vector</code> and at runtime I want to pass it an <code>Integer</code>, <code>Character</code>, or <code>Float</code>: </p>
  
  <pre><code>public static Vector&lt;Object&gt; interestingValues = new Vector&lt;Object&gt;();
  </code></pre>
  
  <p>At the same time I want to get an <code>Integer</code>, <code>Float</code>, or <code>Character</code> from it, so there are two things:</p>
  
  <ul>
  <li><p>Will they retain the specific <code>Integer</code>/<code>Float</code>/<code>Character</code> type in the <code>Object</code> <code>Vector</code>, or they all will be stored in the form of <code>Object</code>?</p></li>
  <li><p>How can I retrieve <code>Integer</code> objects from this <code>Vector</code>?</p></li>
  </ul>