if I have a code which has the clone() method but as I know that the duplicate code is bad here(in that application e.g.bank Application),what should I do??? the clone() method is in the bankOfAmerica which implements IAccount(IAccount has the clone() method header!)One person has override the clone() method in the bankOfAmerica class and I don't want to make duplicate code here.what should I do with that clone() method.
clone() method:
public IAccount clone() throws CloneNotSupportedException {
return (BankOfIranSavingsAccount) super.clone();
}