adplus-dvertising
frame-decoration

Question

Which of these modifiers can be used for a variable so that it can be accessed from any thread or parts of a program?

a.

transient

b.

volatile

c.

global

d.

No modifier is needed

Posted under Java Programming

Answer: (b).volatile

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of these modifiers can be used for a variable so that it can be accessed from any thread or parts of a program?