Question 41Asked in UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)

Which methods are utilized to control the access to an object in multi-threaded programming?

  1. AAsynchronized methods
  2. BSynchronized methods
  3. CSerialized methods
  4. DNone of the above
Show answerHide answer

Correct answer: (B) Synchronized methods

Explanation

Synchronization is the capability to control the access of multiple threads to shared resources. Without it, one Java thread could modify a shared variable while another thread is using or updating the same variable; synchronized methods prevent this.

From UGC NET Computer Science PYQ, December 2014 (Paper II & III, Selected Questions)

This is question 41 of UGC NET Computer Science PYQ, December 2014 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.