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

How to check if linked list contains loop in java?

890


What is difference between next () and nextline () in java?

982


What do you meant by active and passive objects?

1073


Why volatile is used in java?

1049


Can we clone singleton object in java?

1010


How do you represent a space in regex java?

1007


What are the advantages and disadvantages of reference counting in garbage collection?

1018


What is the purpose of garbage collection in java? When is it used?

1041


Is java jre still free?

950


What does those terms actually mean included in the j.d.k i.6?

2116


What is an array in java?

1187


How to reverse a string in java?

1066


How we can make copy of a java object?

1092


What is void data type?

977


How to add menushortcut to menu item?

995