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


Hi Friends, I am new to java. Can u explain about thread
concept.How i know one thread is locked, and how can i force
or acquire another thread for lock . Finally how to know
thread is released from lock. Explain types of lock(like
method level and block level) in thread.



Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, a..

Answer / ravikiran

Thread is a sequential flow of control

With the help of wait(),notify(),notifyAll() methods from
the Object class

We can force a thread to be locked by making the object to
be synchronized or putting the code inside a synchronized block

We will got to know the unlocking status with the help of
notify / notifyAll method calls.

Method level block will provide a lock for the whole method
access.Block level lock will lead to a particular portion of
a program to be get locked.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

If an object reference is set to null, will the garbage collector immediately free the memory held by that object?

0 Answers  


What is the use of static class?

0 Answers  


What happens when a class is made static like if a field or member is made static it becomes class variable and is shared by all the object of the class?

1 Answers  


There is a Banking application. It has 2 types of account, Savings and Current. Write a method calculateInterest by passing an ArrayList of these account objects and calculate Interest accordingly. Write code for this situation

1 Answers   ABC, KPIT,


What are the OOAD concepts in java explain with examples?

4 Answers   Aricent, CTS,


Can we use return in constructor?

0 Answers  


Is empty set an element of empty set?

0 Answers  


What is codebase?

0 Answers  


int a=1; float b=1.0; System.out.println(a==b);

13 Answers   CTS, Honeywell, McAfee,


what is platform native code

2 Answers   i3 Solutions,


what is the difference b/w design pattern and architecture

4 Answers   Covansys,


Explain about GridBag Layout?

1 Answers  


Categories