Hello.
In my Java application I have method
public <T extends Transaction> boolean appendTransaction(T transaction) {
...
}
and inside of this method I need to create an instance of object T which extends Transaction
Is it correct to do it in this way
T newTransaction = (T) transaction.getClass().newInstance();