Public class Counter{private int counter;public Counter(){counter=0;}public synchorized int getCounter(){return counter;}public synchorized int setCounter(){counter=0;return counter;}public synchronized int incCounter(){return(++counter);}}A web container should dispatch multiple client requestsrequests with the following page directive:what should be the value for the isThreadsafe argument and why?

Showing Answers 1 - 3 of 3 Answers

vijaya

  • Dec 25th, 2006
 

if counter is ment to count the number of user using this class...

then isThreadSafe must be set to true else false

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions