I have two objects of same type.
Class A { String a; List b; int c; } A obj1 = new A(); A obj2 = new A(); obj1 => {a = \"hello\"; b = null; c = 10
If you create getters and setters for the attributes, you can use the copyProperties method from Commons BeanUtils.