Question: Which code snippet is valid?
- `ArrayList
words = new ArrayList (){"Hello", "World"};` - `ArrayList words = Arrays.asList("Hello", "World");`
- `ArrayList
words = {"Hello", "World"};` - `ArrayList
words = new ArrayList<>(Arrays.asList("Hello", "World"));`
Answer: The correct answer of the above question is Option D:`ArrayList