Change ArrayList to three dots for an input

Viewed 2189

I have a method that has as a signature, let's say method(Object... args) And one of my other methods creates an ArrayList<Object> list.

What should I do so I can use method(list)? I have tried to do method(Arrays.asList(list)) but it has not worked

1 Answers
Related