Hi friends,
This is regarding synchronization in Thread. If a block or method is synchronized, which object is said to be synchronization?
ramjeev -2 Junior Poster in Training
Recommended Answers
Jump to PostSorry ramjeev, musthafa is right. "this" is the method's object.
See Java Lanmguage ref:
8.4.3.6 synchronized Methods
A synchronized method acquires a monitor (§17.1) before it executes. For a class (static) method, the monitor associated with the Class object for the method's class is used. For …
Jump to PostYes.
All 8 Replies
musthafa.aj 6 Posting Whiz
ramjeev -2 Junior Poster in Training
musthafa.aj 6 Posting Whiz
ramjeev -2 Junior Poster in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
ramjeev -2 Junior Poster in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
ramjeev -2 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.