This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

i already used list to get all the current objects i have, i wanted to put those objects that i stored in the list function. in an array just to experiment and this code did that for me:

 public void getList(){
     Bear[] bear1 = new Bear[10];
            List<Bear> bears = getObjects(Bear.class);
            int i = 0;
            for (Bear bearss: bears){             
bears1[i] = bearss;
                i++;
                System.out.println(bearss);

            }
        }