java.net.URL. You must use java.net.URI. You should transfer objects whenever possible, and not by Lines. This eliminates the mistakes of the programmer, for example, to get the method parameters in the wrong way - the compiler will not pick it up if both of them are strings.
source
share