Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.net.MalformedURLException;
import java.net.URL;

public class Main {

    public static void main(String[] a) {

        try {
            URL base = new URL("http://www.java2s.com/");
            URL relative = new URL(base, "index.html");
            System.out.println(relative);
        } catch (MalformedURLException ex) {
            ;
        }

    }

}