一个关于URLDecoder.decode的问题

 URL url = new URL("http://www.test.com/?__biz=3214321==&mid=321423");
        String query = url.getQuery();
        System.out.println(URLDecoder.decode(query,"utf-8"));

上述程序运行后为什么是__biz=3214321==&mid=321423而不是"http://www.test.com/?__biz=3214321==&mid=321423,getQuery()有什么作用,看了api还是不懂,希望大神可以解答

getQuery

public String getQuery()

Gets the query part of this URL.

Returns:
the query part of this URL, or null if one does not exist

Since:
1.3

上面是官方1.7的解释,翻译过来就是获取URL的查询部分(问号后面的部分)。

 http://tool.oschina.net/apidocs/apidoc?api=jdk_7u4

URL在java.net包下面.

url.getQuery();估计是去掉url问号前面的部分

因为作为参数,我们不关心前面的部分。