Suppose, I have a class like this...
public class MyClass {
private String firstName;
private String lastName;
public String getFirstName() // ....
// ... usual getters
}
And I want to dynamically make a new object and has the exact same fields and values and add just three more? How do I do that. One idea convert MyClass to a Map and just add the fields.
Any better idea?
Thanks