Java Programming Quiz

Time: 00:00:00
0
Attempted
20
Not Attempted
0
Marked For Review
0
Attempted & Reviewed

Question 1 of 20

Given: public class NamedCounter { private final String name; private int count; public NamedCounter(String name) { this.name = name; } public String getName() { return name; } public void increment() { count++; } public int getCount() { return count; } public void reset() { count = 0; } } Which three changes should be made to adapt this class to be used safely by multiple threads? (Choose three.)

Select Your Answer:

All Questions

Attempted
Not Attempted
Marked for Review
Attempted & Reviewed
Current