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 are meta-annotations?

1001


What are the differences between stringbuffer and stringbuilder?

1070


What happens when heap memory is full?

998


What is the difference between super class & sub class?

1201


What is the integer of 16?

979


Can you use abstract and final both with a method?

1109


how to write a program for sending mails between client and server

2083


What is a methodologist?

1075


Explain the difference between jdk, jre, and jvm?

1045


What does it mean that a method or field is “static”?

982


What is method overloading with type promotion?

1284


What are methods and how are they defined?

1218


Explain different types of thread priorities ?

1097


Is nullpointerexception checked or unchecked?

1041


What is diamond operator in java?

968