What is waiting state? In what ways a thread can enter into
waiting state?

Answers were Sorted based on User's Feedback



What is waiting state? In what ways a thread can enter into waiting state?..

Answer / sandya

In 3 ways:
1.A Thread can enter the waiting state by invoking it's
sleep() method
2.By blocking on i/o by unsuccessfully attempting to
acquire an object's lock or by invoking an object's wait()
method.
3.It can also enter the waiting state by invoking it's
suspend() method.

Is This Answer Correct ?    27 Yes 2 No

What is waiting state? In what ways a thread can enter into waiting state?..

Answer / anonymous

2 ways.
wait( time ---);
sleep();

Is This Answer Correct ?    6 Yes 7 No

Post New Answer

More Advanced Java Interview Questions

Where does the session Object stores? If 100 users are connecting to the server. How does it recognize which session belongs to which user?

5 Answers   HCL, Mobillo Venture,


How would you reatach detached objects to a session when the same object has already been loaded into the session?

1 Answers  


What is private static final long serialVersionUID = 1L;

3 Answers   Google,


Name three subclasses of the component class?

1 Answers  


Define the remote interface?

1 Answers  


What is the difference between Super and This Keyword?

4 Answers   HCL, TCS,


Which are the different segments of memory?

1 Answers  


Wt is the main difference between Java and Java J2EE and Advanced java?

5 Answers   Wipro,


Explain the advantages and disadvantages of detached objects.

1 Answers  


a US company has filed my H1B visa ,, and i got selected in random number process.I wanna ask Could they ask regarding my languages(java,c++) or there will b just general questions?? And wat kind of questions will they ask in embassy interview??

2 Answers  


What are the thread-to-thread communcation?

1 Answers  


Explain phantom read?

1 Answers  


Categories