how to handle a singleton service locator. when multiple threads
are trying to get the singleton object in same time
Answer Posted / gowramma m
Two ways to create threads
1)by creating thread class
class classname extends Thread
{
}
2)By converting class to thread ie using Runnable interface
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
Is singleton class thread safe?
Can two objects have same hashcode?
When can you say a graph to be a tree?
Explain hashset and its features?
Can we extend singleton class?
Who developed java?
Explain different ways of creating a thread?
How do you reverse sort a list in java?
What is the purpose of static keyword in java?
What is difference between wait and notify in java?
What is split return?
What is composition in java?
What is the difference between pass by reference and pass by pointer?
Define immutable object?
What are triggers in DB? Explain their types. How do they work?