Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] argv) throws Exception {
        HttpURLConnection.setFollowRedirects(false);
        HttpURLConnection con = (HttpURLConnection) new URL("http://www.google.coom").openConnection();
        con.setRequestMethod("HEAD");
        System.out.println(con.getResponseCode() == HttpURLConnection.HTTP_PARTIAL);
    }
}