AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-851





Question ID 22678

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.)

Option A

declare reset() using the synchronized keyword

Option B

declare getName() using the synchronized keyword

Option C

declare getCount() using the synchronized keyword

Option D

declare the constructor using the synchronized keyword

Option E

declare increment() using the synchronized keyword

Correct Answer A,C,E
Explanation


Question ID 22679

Given that t1 is a reference to a live thread, which is true?

Option A

The Thread.sleep() method can take t1 as an argument.

Option B

The Object.notify() method can take t1 as an argument.

Option C

The Thread.yield() method can take t1 as an argument.

Option D

The Thread.setPriority() method can take t1 as an argument.

Option E

The Object.notify() method arbitrarily chooses which thread to notify.

Correct Answer E
Explanation

Send email to admin@getfreedumps for new dumps request!!!