Synchronized Methods

Synchronized Methods

Synchronized method is basically a use synchronized keyword.Its indicate the method only 1 time accessed to a thread at a same time.A typical synchronized declaration looks like this :



public synchronized Record retrieveUserInfo(int id) { }


We know that synchronized modifier can be similar as four access control levels  and we can also combine synchronized with final,but never with abstract.

By:UMANG
Date:2024-02-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related SCJP1.5 chap2 Links

SCJP1.5 chap2 interview questions and answers for experienced and fresher