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

How to make a method thread safe without using synchronized
keyword?

Answer Posted / dandhar

Make the "inUse" variable to static.

private static boolean inUse = false;

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you have two constructors in java?

986


What is slash r?

1011


What is string args [] in java?

1031


Mention some interfaces implemented by linked list in java.

1022


Is cout buffered?

1187


How can you avoid serialization in child class if the base class is implementing the serializable interface?

1082


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1240


What is meant by class loader? How many types are there? When will we use them?

971


Give a practical example of singleton class usage?

1058


What is the basic concepts of OOPS?

1196


Write a program to print all permutations of string?

1116


What's the access scope of protected access specifier?

1038


What does pointer mean?

1059


What are annotations in java?

1095


How do you test a method for an exception using junit?

1210