Java?Base64Decoder???????Base64?????,???URL?????????URL????,????java.net.URLDecoder?????????URL?????,???URL???????????????
??,??????URL??????,????????:
import java.net.URLDecoder; import java.nio.charset.StandardCharsets; public class Main { public static void main(String[] args) { String encodedUrl = "https://www.example.com/search?q=java"; try { String decodedUrl = URLDecoder.decode(encodedUrl, StandardCharsets.UTF_8.toString()); System.out.println("Decoded URL: " + decodedUrl); } catch (Exception e) { e.printStackTrace(); } } }
???????:
Decoded URL: https://www.example.com/search?q=java