Forums Register Login
Q. Can I clone String Object if yes then How ?
(1 like)
Since String is immutable, you never need to.

However, if you really want to...you can't use clone(), because it isn't Cloneable. But you can use the copy-constructor to get a copy of it (new String(str)).
Thanks Matthew Brown ...
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 494 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jun 21, 2018 17:32:59.