Never say never;)
In the above example, you can always catch an exception and then throw a RuntimeException:
public void myMethod() {
try {
...
String encodedString = URLEncoder.encode(foo, "utf-8");
...
} catch(UnsupportedEncodingException e) {
throw new RuntimeException("This should not be possible",e);
}
}
, -, , 99,999%, , , , , , , , .