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

Is it possible to write a regular expression to check if string is a number?

0 Answers  


What is java beans?

0 Answers  


What is the purpose of having the concept of overloading?

7 Answers   Ness Technologies,


What is exception propagation?

0 Answers  


What is difference between add() and addelement() in vector?

0 Answers  


Tell us something about an iterator.

0 Answers  


How do you clear an arraylist in java?

0 Answers  


What is generic type?

0 Answers  


Can Java be said to be the complete object-oriented programming language

1 Answers  


int a=1,b=10; System.out.println(a+b--);

12 Answers   HCL,


why marker interfaces are there in java

4 Answers   Digital Group,


What is cloneable interface?

8 Answers  


Categories