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...

what is mean by thread lock?

Answer Posted / maninder kaur

thread locking is achieve by synchronized keyword.
for eg...
public synchronized void disp()
{
}

or

public void disp()
{
synchronized(this)
{
}
}

it makes a lock on disp method until we comes to the end of the block.
so that no other thread can modify it.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between Heap and Stack Memory?

1029


What are the advantages of java over C++?

1185


What is a consumer in java?

997


What is ascii format?

971


What are the differences between getting and load method?

1154


How do you use compareto?

927


How thread scheduler schedule the task?

1040


Why java does not support pointers?

1011


What is mnemonic in assembly language?

1054


What do you understand by looping in java? Explain the different types of loops.

1033


What is singleton class in java and how can we make a class singleton?

1135


What is the need of transient variables in Java ?

1057


Why string is not a wrapper class?

1170


Is empty set an element of empty set?

1080


Can we have multiple classes in single file ?

1055