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

These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

1049


What is * argv?

1195


Is age discrete or continuous?

1089


How are destructors defined in java?

1006


What is mutable object and immutable object?

1099


What do you understand by java virtual machine?

1146


Define "Access specifiers" in java.

1133


Why do we use regex?

976


Can we declare a class as static?

1056


Explain OOPs concept.

1055


What is parameters example?

983


What is the difference between choice and list?

1062


What is charat java?

921


What is port number in java?

1005


What is the role of garbage collector in java?

923