title: Cloning objects
body: <p>For the purposes of making a copy of an object and getting access to its data, what is better and why?</p>
  
  <p><strong>1. Create a new object and initialize it with the data you want to
      clone through the constructor</strong></p>
  
  <pre><code> HashSet&lt;String&gt; myClone = new HashSet&lt;String&gt;(data);
  </code></pre>
  
  <p><strong>2. Clone object as is and cast it to the type you believe it to be</strong></p>
  
  <pre><code> HashSet&lt;String&gt; myClone = (HashSet&lt;String&gt;) data.clone();
  </code></pre>