List.of and Arrays.asList are not ordinary lists
QuizMediumJava onlyAsked in: Capgemini, Wipro
Which statements are true? Pick all that apply.
List.of(1, 2).add(3)throws UnsupportedOperationExceptionArrays.asList(1, 2).set(0, 9)worksArrays.asList(1, 2).add(3)worksList.of(1, null)creates a list holding a null
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.