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

Does list allow duplicates in java?

0 Answers  


What is the string function?

0 Answers  


What is final int?

0 Answers  


What about method local inner classes or local inner classes in java?

0 Answers  


What is the difference between interpreter and compiling ?

2 Answers   TCS,


Does java isempty check for null?

0 Answers  


What is vector capacity in java?

0 Answers  


I need help please send me reply: Write a program "if given a string like 'HAT', the combination's returned should be like ATH,THA,TAH in java"?

4 Answers  


Explain the different forms of polymorphism?

0 Answers  


What is integer valueof?

0 Answers  


What does java stand for?

0 Answers  


Why we use multi threading instead of multiprocessing?

0 Answers  


Categories