You have the following list:
List<String> names = List.of("Larry", "Kenny", "Sabrina");
What happens if someone invokes the set(0, "Mary") method on this list?
You have the following list:
List<String> names = List.of("Larry", "Kenny", "Sabrina");
What happens if someone invokes the set(0, "Mary") method on this list?
Create a free account to access the full topic