StringTokenizer
??????? URL ????????,????? java.net.URLDecoder
???? URL ?????????????????,?????? StringTokenizer
?? URL ????????,???????:
import java.net.URLDecoder; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { String urlEncodedString = "Hello, World! ??!"; // URL ?????? String decodedString = URLDecoder.decode(urlEncodedString, "UTF-8"); // ?? URL ?????? StringTokenizer tokenizer = new StringTokenizer(decodedString); // ??????????? StringTokenizer while (tokenizer.hasMoreTokens()) { System.out.println(tokenizer.nextToken()); } } }
??????,?????? URLDecoder.decode()
??? URL ??????????????????,??????????????? StringTokenizer
??,???????