Object[] o = new Object[]{};
System.out.println(o instanceof Cloneable);
This gives true as o/p. I could not understand why?
All arrays in Java are Cloneable and Serializable.
A clone on an array just copies the array (shallow copy, not cloning the contents).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With