title: How to clone object in java
body: <p>I want to create a list/array of object with the same parent class which then I will use it for reference. but i dont know how to clone those object to make a new object.</p>
  
  <p>here is the example</p>
  
  <pre><code>BigFoo a;
  SmallFoo b;
  ChickenFoo c;
  List&lt;Foo&gt; foos;
  foos.add(a);
  foos.add(b);
  foos.add(c);
  
  Foo foo = foos.get(1).clone();
  </code></pre>
  
  <p>but in Java i found no clone function in the default function. I wonder how this is accomplished?</p>