shallow copy copies only the reference. deep copy copies the content referrenced. You can override the clone method to do a shallow or deep copy although a deep copy is generally assumed.
To explain a little further. Imagine if you haad an ArrayList full of JButtons. With a shallow copy, you would have two ArrayLists but still the same number of Jbutton objects. With a deep copy, the ArrayList would be copied and so would all the items in the ArrayList. So if you started with 20 JButtons in one ArrayList you would now have 40 JButton objects in two ArrayLists.
Post by:autobot
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
a bit of art, as a gift, that will fit in a stocking