title: In Java, when should I use "Object o" instead of generics?
body: <p>For example, I could write either of these:</p>
  
  <pre><code>class example &lt;T&gt;
  {
      ...
  
      public void insert (T data)
      {
          ...
      }
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>class example
  {
      ...
  
      public void insert (Object o)
      {
          ...
      }
  }
  </code></pre>
  
  <p>Is there a signficant difference between the 2 in terms of performance? With generics I could restrict the type of the parameter and with the second approach I guess it wouldn't be necessary to define the type of the object as it is created.</p>
  
  <p>Also, with the second approach I could basically insert anything into the class, right? Whereas with generics every element in the class would be of the same type.</p>
  
  <p>Anything else I'm missing?</p>