public static void main(String[] args) {
String str1 = "https://test1-life.pingan.com/ilifecore/productMall/loading.html?productId=8000000241&channelCode=XCX00001&productCode=00001&actionType=underwrite&actionResult=2";
String str3="";
String str4="";
try {
str3 = URLEncoder.encode(str1,"UTF-8");
str4 = URLDecoder.decode(str3, "UTF-8");
// System.out.println("str2"+str2);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(str1.equals(str4)){
System.out.println("str3="+str3);
}else{
System.out.println("str3="+str3);
System.out.println("str4="+str4);
}
}html