Forums Java Help synchronized block vs. synchronized method

This topic contains 1 reply, has 2 voices, and was last updated by  Aakanksha 7 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15262

    ahprofessional
    Participant

    Why would you use a synchronized block vs. synchronized method?

    #15265

    Aakanksha
    Participant

    Synchronized blocks place locks for shorter periods than synchronized methods.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.