CodesJava

Easy learning with example program codes

Decode url in java


Decode url in java

package com.codesjava;
 
import java.net.URLDecoder;
 
public class URLTest {
  public static void main(String args[]){
	try {
            String decodedUrl = "https%3A%2F%2Fcodesjava.com";
            String url = URLDecoder.decode( decodedUrl, "UTF-8" ); 
            System.out.println(url);
        } catch (Exception e) {
            e.printStackTrace();
        }
  }
}

Output

https://codesjava.com
Please follow and like us:


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki