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

How do you remove spaces in java?

0 Answers  


What does this () mean in constructor chaining concept?

0 Answers  


What is the difference between arraylist and hashset in java?

0 Answers  


What is meant by method overriding?

0 Answers  


How do you create a first line indent?

0 Answers  


How to convert string to int in java?

1 Answers  


What restrictions are placed on method overriding in java programming?

0 Answers  


What is an abstract class and what is it’s purpose?

0 Answers  


explain copyonwritearraylist and when do we use copyonwritearraylist?

0 Answers  


What does you mean in math?

0 Answers  


What is Java Classloader?

1 Answers   Phantom Technologies,


Explain Stream Tokenizer?

4 Answers  


Categories