Effective Java! Override clone judiciously

Kyle Carter
5 min readJan 10, 2021

Today we are talking about the Cloneable interface and it related clone function. Honestly I haven't interacted any with this method in the past and after learning about it I'm not sure I really want to, it seems quite error prone. So let's dive in and understand this method so that we can make intelligent decisions about whether to use this method or not.

So what is the Cloneable interface. It is a mixin interface that signals to users of the class that a certain action can be performed on the class. The extremely weird thing about this particular mixin is…

--

--

Kyle Carter

I'm a software architect that has a passion for software design and sharing with those around me.