Multi Threading
© examsiri.com
Question : 5 of 44
Marks:
+1,
-0
Given:
Which three changes should be made to adapt this class to be used safely by multiple threads? (Choose three.)
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.)
Go to Question: