I want to do
public class Settings
{
static final URL logo = new URL("http://www.example.com/pic.jpg");
}
but they told me what I need to process MalformedURLException. Specifications say there MalformedURLExceptionare
Emphasized that an invalid URL has occurred. Either no legal protocol can be found in the specification line, or the line cannot be analyzed.
Now I know that the URL I am giving is not garbled, so I prefer not to handle the exception, which, as I know, cannot happen.
Anyway, to avoid unnecessarily blocking the try-catch block associated with my source code?
source
share