代码如下,运行正常,但Eclipse编辑器对URLEncoder.encode提示警告
<%
    String strTm1 = "中国";
    String strTm2 = URLEncoder.encode(strTm1);
    out.println(strTm1);
    out.println(strTm2);
%>
警告信息如下:
The method encode(String) from the type URLEncoder is deprecated
这是怎么回事?有没有其它方法进行相应的编码操作?