import java.net.URLEncoder; public class MainClass { public static void main(String[] args) throws Exception { System.out.println(URLEncoder.encode("A/B/C/", "UTF-8")); } }
A%2FB%2FC%2F