I came across this question and was unable to answer this. Can anyone help me regarding this question?
This is the given Class
Here were the questions asked.
1. This class has a serious flaw. What is it and how can it be fixed?.
2. Improve performance of the class in concurrent environment using the Java Concurrency package.
Explain why performance is better.
3. Write a test which demonstrates performance improvement in a concurrent environment.
Yes it is homework. But I am not good at Synchronize thingy.! My concepts are not clear about this. I did do my other homework . So please do tell me what would be your answers? I will make sure i shall study that later but the reason i posted is i am running short of time n i need this to be done asap.