MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.net.URLDecoder;

public class MainClass {

    public static void main(String[] args) {

        String input = "http://www.java2s.com/query?pg=q&kl=XX&stype=stext&q=%2B%22Java+Programming%22&search.x=30&search.y=7";
        System.out.println(input);
        try {
            String output = URLDecoder.decode(input, "UTF8");
            System.out.println(output);
        } catch (Exception e) {
            System.err.println("Malformed URL");
        }

    }

}