Question from the Java test

What is the result of executing the following code: ```java var list= List.of("1","2","3"); list.add("4"); list.forEach(elt ->System.out.print(elt)); ``` Answer: An exception

Expert

What is the result of executing the following code

var list= List.of("1","2","3");
list.add("4");
list.forEach(elt ->System.out.print(elt));
Author: LoïcStatus: PublishedQuestion passed 289 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!