Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How the threads are synchronized?

Answers were Sorted based on User's Feedback



How the threads are synchronized?..

Answer / seshadri pera

Threads are synchronized in two ways.

1) block level
2) Method level

Block level synhronization is the better performance
compare to method level.

Block Level:
see the code syntax for block level
synchronized {..
....//code to lock the specific object here..
...}

Method Level:
See the syntax
public void synchronized XXXMethodName(Parameters or
object to acquire locking){.....
...}

Is This Answer Correct ?    7 Yes 1 No

How the threads are synchronized?..

Answer / dsr

By using wait(),notify and notifyall() methods in the code.

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More Core Java Interview Questions

What are meta-annotations?

0 Answers   Cyient,


What is the difference between sleep and wait in java?

0 Answers  


Explain when classnotfoundexception will be raised ?

0 Answers  


How do you define a variable?

0 Answers  


what questions are been asked ??? for interview in apti

0 Answers  


What is Collections API?

1 Answers  


What are the advantages of unicode?

0 Answers  


Say any two properties in beans?

0 Answers  


What mechanism does java use for memory management?

0 Answers  


How many bytes is a string?

0 Answers  


Can we iterate through collection using for loop?

2 Answers   Rolta,


What is the differences between heap and stack memory in java? Explain

0 Answers  


Categories