Intern — Middle
What will be output to the console after executing the program
livecode
Task condition
Determine what output will appear on the standard output when the following code fragment is run.
import java.util.ArrayList;
import java.util.List;
public class FirstTask {
public static void main(String[] args) {
List<String> list = new ArrayList<>();
doSomething(list);
System.out.println(list);
}
private static void doSomething(List<String> list) {
list = null;
}
}