title: How does java clone() really use shallow copy?
body: <p>I know It might be already asked, but my question is something different. I've searched and I know java method <code>object.clone()</code> uses shallow copy which means copying references and not the actual objects. Let's say I have a dog Class</p>
  
  <pre><code> Class Dog{
       public Dog(String name, DogTail tail, DogEar ear){
            this.name = name;
            this.tail = tail;
            this.ear  = ear;   
       } 
  } 
  DogTail t = new DogTail(); 
  DogEar ear = new DogEar(); 
  Dog dog1 = new Dog("good", t,ear);
  </code></pre>
  
  <p>let's say I want to get a copy of dog1.</p>
  
  <blockquote>
    <p>Dog dognew = dog1.clone();</p>
  </blockquote>
  
  <p>If this <code>clone()</code> method uses shallow copy, it means copying references. So If I change t object created above or ear method, it's gonna change in the dognew object or vice versa. How is this cloning good? This question was born because someone said that creating an big huge object is worse than cloning, as you save performance while using <code>clone()</code> method. </p>