subject

Need help pls public class TestThread extends Thread { private static int x;
public synchronized void doSomething () {
int current = x;
current++;
x = current;
}
public void run() {
doSomething();
}
}

Which statement is
true?
Select one:

a. Declaring the doSomething() method as static would make the class thread-safe

b. Synchronizing the run() method would make the class thread-safe

C. The data in variable "X" are protected from concurrent access problems

d. Compilation fails
e. An exception is thrown at runtime

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Intellectual property rights are exclusive rights that protect both the created and the creation. ipr offers exclusively what benefits to the person or people covered by it
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
You know the right answer?
Need help pls public class TestThread extends Thread { private static int x;
public synchroniz...
Questions
question
Mathematics, 30.01.2020 06:02
question
Mathematics, 30.01.2020 06:02
question
Mathematics, 30.01.2020 06:02
Questions on the website: 13722359