A list passed into a constructor
java
Student(String name, List<String> subjects) {
this.subjects = subjects;
}
The caller keeps their list and adds to it afterwards. What happens?
java
Student(String name, List<String> subjects) {
this.subjects = subjects;
}
The caller keeps their list and adds to it afterwards. What happens?