1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Pepsi [2]
4 years ago
8

Recall that the Counter class initializes itself to 0 and allows a client to increment it, and the Increase class is initialized

with a Counter c and an int amount and when run, invokes increment on the Counter object c amount times. Identify the possible output of the following code sequence: Counter c = new Counter(); Runnable r = new Increase(c, 2); Thread t = new Thread(r); c.increment(); t.start(); System.out.println(c);
Computers and Technology
1 answer:
artcher [175]4 years ago
4 0

Answer:

Output can be 0 or 1 or 2.

Explanation:

As we are initializing the value with 2 so at most it will increment to 2 times means value will be 2.

when main thread is printing the c , Increase thread might be started or might not be started

so output can be 0 or 1 or 2

You might be interested in
A list that is not sorted by numbers is called a?
Feliz [49]

Answer:

An unordered list(HTML)

6 0
3 years ago
A DNS server on your client's network is receiving a large number of DNS queries from what appears to be a workstation on their
drek231 [11]

Answer:

The answer is reflective DNS attack

Explanation:

Reflective DNS Attack is used in many distributed DDoS attacks to knock down an internet pipe. The attack is divided in two stages: first  the attacker sends lots of requests to one  or more legitimate DNS servers  while using spoofed source IP of the target person, and then, in the second stage, the DNS server receiving the semi-legitimate requests replies to the spoofed IP, thereby unknowingly lauching an attack on the target computer with responses to requests never sent by the victim.

4 0
4 years ago
• Why does a lunar eclipse last longer than a solar eclipse?
Wittaler [7]
The shadow cast by the earth is quite a bit larger than the moon
5 0
4 years ago
1. Trình bày các mô hình mối đe dọa trong hệ thống viễn thông
just olya [345]

Explanation:

please subscribe to my mom channel please

i request you

7 0
3 years ago
What are two types of system software
puteri [66]

Answer:

systems software and application software.

Explanation:

Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system

8 0
4 years ago
Other questions:
  • john wants to view sarah's assignment files on his computer. but he cannot open them because of version problems. which upgrade
    14·2 answers
  • 5. If you are 16 to 20 years old, you are __________.
    14·1 answer
  • Create a lottery game application. Generate three random numbers (see Appendix D for help in doing so), each between 0 and 9. Al
    14·1 answer
  • In Word, the default typing mode is ____ mode, which means as you type a character, Word moves all the characters to the right o
    14·2 answers
  • In a proper webpage which tag holds all of a webpages visible HTML?
    9·2 answers
  • A 'array palindrome' is an array which, when its elements are reversed, remains the same (i.e., the elements of the array are sa
    13·1 answer
  • What are the applications of computer in the field of study​
    12·2 answers
  • Realiza una tabla acerca de los escenarios de usos más comunes de Excel.
    15·1 answer
  • Topic: Graphs.1.) Bob loves foreign languages and wants to plan his courseschedule for the following years. He is interested in
    8·1 answer
  • Ok it is important aspects which is perfect
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!