when i am creating new object of Particular class using new keyword it occupies some memory in heap
For example i have class Xyz
and i am creating object of Xyz
using new keyword and it occupies some
memory in heap
Xyz xyz = new Xyz();
now assume that xyz
have memory location 12@FFD
same object create using clone method
Xyz xyzClone =(Xyz) super.clone()
my question is if xyzClone
occupies different memory in heap than xyz
than why we need clone method
we can achieve same behavior using new keyword ??? and if xyzClone
occupies no extra memory than it may
be behave like Singleton
Please clear my confusion why we need clone method ???