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.
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 |
What do you understand by overloading and overriding in java?
Why are pointers not secure?
What is the size of int in 64-bit jvm?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
Can we declare an interface as final?
how can u handle run time exception in java? explain with brief explanation with examples?
Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?
What are the core java topics?
How are destructors defined in java?
In what type of containers, Border layout is a default layout?
Class A extends Class B but Class A also inherit Super Class Object so it is multiple inheritence give reason in support of your answer
Explain about static imports in java?