logo

Crowdly

Browser

Add to Chrome

What changes need to be made to make the following immutable object pattern corr...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What changes need to be made to make the following immutable object pattern correct? (Choose all that apply.)

import java.util.List;

public class Seal {

String name;

private final List<Seal> friends;

public Seal(String name, List<Seal> friends) {

this.name = name;

this.friends = friends;

}

public String getName() { return name; }

public List<Seal> getFriends() { return friends; }

}

None; the immutable object pattern is properly implemented.

0%
100%
0%
0%
0%
100%
0%
0%
More questions like this

Want instant access to all verified answers on dl.nure.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome