Encode parentheses() for URL in Java
Description
The following code shows how to encode parentheses() for URL.
Example
/*from w ww . ja v a 2s. co m*/
import java.net.URLEncoder;
public class Main {
public static void main(String[] args) throws Exception {
System.out.println(URLEncoder.encode("A(B)C(D)", "UTF-8"));
}
}
The code above generates the following result.