Multiple values in an Arraylist in one line Help

I have been trying to add multiple values in an arraylist at one time and I’ve looked up different methods and none of them have been working. It’s with the string variable and for my project I do need for each word to be it’s own separate index.

Any ideas or methods?

Can you show what you’ve tried? you’re probably close.

ArrayList nameOfList = new ArrayList<>(List.of(“bye”, “hi”));

nameOFList.addAll(arraylist, “bye”, “hi”);

nameOfList.addAll(Arrays.asList(“Hi”,“Bye”));