Example
public
class
ClassA {
public void
methodA {
//...
System.exit(0);
}
Solution
Throw a RuntimeException instead.
public
class
ClassA {
public void
methodA
throws
RuntimeException {
//...
throw new
RuntimeException();
}