Adding items

Report a typo

The following code creates an instance of ArrayList and fills it with characters.

ArrayList<Character> characters = new ArrayList<>();

characters.add('a');
characters.add('b');
characters.add(1, 'c');
characters.add(1, 'd');
characters.add('e');
characters.add(5, 'f');

What will characters contain after running this code?

Select one option from the list
___

Create a free account to access the full topic