Loading
Copy Properties

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Copy Properties from one Bean to another Bean ?


Ans)

 You got to use "BeanUtils" for this purpose , this is really helpful when you want generalize some solution.  

FromBean fromBean = new FromBean("fromBean", "fromBeanAProp");
  ToBean toBean = new ToBean("toBean", "toBeanBProp");
  try {
      BeanUtils.copyProperties(toBean, fromBean);
  
} catch (IllegalAccessException e) {
   e.printStackTrace();
  } catch (InvocationTargetException e) {
   e.printStackTrace();
  }
 



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Copy Properties


Copy Properties

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free