More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. static methods and static elements are shared by all objects of a class and hence could create problem.
Static methods are not synchronized by default and hence could create problem when accessed through multiple threads. Static elements are shareable by class and hence state of one object could be altered by another object.
Some limitations with Unit testing as not all mocking framework facilitate mocking them. Power mock allows but Mockito doesn't
Help us improve. Please let us know the company, where you were asked this question :