Some of our code written a while have unnecessary semi-colon. I wonder whats the easiest way to remove them. For example, the last semi-colon in the following
if(i == 2)
{
System.out.println("if statement");
}
else
{
System.out.println("else statement");
};
You can find them easily enough by going into the Java Compiler / Error and Warnings preferences, then under "Potential Programming Problems" change "Empty Statements" to warning or error. Then it'll just be a matter of going through them. There may be a way of automating it, but I wouldn't bother unless there are loads :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With