title: How to fix the following PMD violations
body: <p>I am using PMD to analyze code and it produces a few high priority warnings which I do not know how to fix.</p>
  
  <p>1) <code>Avoid if(x!=y)..; else...;</code> But what should I do if I need this logic? That is, I do need to check if <code>x!=y</code>? How can I refactor it?</p>
  
  <p>2) <code>Use explicit scoping instead of the default package private level.</code> But the class is indeed used only within the package. What access modifier should I use?</p>
  
  <p>3) <code>Parameter is not assigned and could be declared final.</code> Should I add final keyword to all the places which PMD pointed out with this warning?</p>