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


Please Help Members By Posting Answers For Below Questions

Can we have any other return type than void for main method?

743


Can you have two constructors in java?

675


How does arraylist size increase in java?

761


Explain importance of finally block in java?

786


Write a program in java to find the maximum and minimum value node from a circular linked list.

756


What is the covariant return type?

767


What will be the default values of all the elements of an array defined as an instance variable?

761


what do you mean by classloader?

736


How big is a boolean?

781


How many types of flags are there?

722


What is a ternary operator in java? What is an interface?

751


What is the difference between an interface and an abstract class?

746


How does java pattern compile work?

734


What is command line argument in java?

825


What is use of set in java?

697