writing a copy method java code example
Example: how to clone an object
const first = {'name': 'alka', 'age': 21}
const another = Object.assign({}, first);
const first = {'name': 'alka', 'age': 21}
const another = Object.assign({}, first);