How to convert POJO class list to Object list?

时间:2018-02-26 17:45:00

标签: java generics arraylist

I have a pojo class name User. Now I am creating ArrayList of User's class using following statement.

ArrayList<User> userArrayList = new ArrayList();

I have another class whose constructure accept a arraylist of Object i.e.

 public className(ArrayList<Object> objectArrayList){
 }

Now if I want to pass userArrayList into objectArrayList then what conversion should I need to use

0 个答案:

没有答案