in Education by
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 I got this question in final exam. Enquiry is from Applets Fundamentals in division I/O & Applets of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The correct option is (b) volatile Easiest explanation: The volatile modifier tells the compiler that the variable modified by volatile can be changed unexpectedly by other part of the program. Specially used in situations involving multithreading.

Related questions

0 votes
    Which of these modifiers can be used for a variable so that it can be accessed from any thread or parts of a ... O & Applets of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    How can the nodes in the node list be accessed? (a) Key (b) Index number (c) Looping (d) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of these method of Thread class is used to Suspend a thread for a period of time? (a) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these method is used to explicitly set the priority of a thread? (a) set() (b) make() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to begin the execution of a thread? (a) run() (b) start() (c ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method wakes up the first thread that called wait()? (a) wake() (b) notify() (c ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these type parameters is used for a generic methods to return and accept any type of object? ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...