title: create new instance from existing instance
body: <p>For some reason when I create a new instance of an object from an existing instance and change values in the new instance, it also changes the values in the existing instance. I would prefer if it only changed the state of the values in the new instance though. I'm not sure why this is happening.</p>
  
  <pre><code>Foo existing = new Foo(1, "foo");
  
  for (int i = 0; i &lt; 10; i++) {
     Foo newFoo = existing;
     System.out.println(newFoo.getName()); //Prints "foo" as expected
     newFoo.setName("bar");
     System.out.println(existing.getName()); //This prints out "bar"?
  }
  </code></pre>
  
  <p>Neither of the objects are static.</p>