Codice: Seleziona tutto
URL url = new URL("http://url:20/cartelle");
System.out.println(url.getPath());
System.out.println(url.getFile());il risultato dei due print è lo stesso. mi spiegate il perchè?
Codice: Seleziona tutto
URL url = new URL("http://url:20/cartelle");
System.out.println(url.getPath());
System.out.println(url.getFile());getFile
public String getFile()
Gets the file name of this URL. The returned file portion will be the same as getPath(), plus the concatenation of the value of getQuery(), if any. If there is no query portion, this method and getPath() will return identical results.
Returns:
the file name of this URL, or an empty string if one does not exist

Visualizzano questa sezione: 0 utenti iscritti e 4 ospiti