Please provide more details or alternative approaches for this.
Please note: I am not overriding the clone method, also I will be grateful if anybody could explain if I should override the clone method and what the advantage would be.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is not about performance, clone performance is OK. But you can clone only Cloneable objects, while Spring’s BeanUtils.copyProperties can copy properties of any JavaBean object (public no-args constructor and setter / getters for properties). E.g. this works fine copying properties of 2 objects of different classes
and prints