Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

        URLConnection connection = new URL("http://java.net").openConnection();
        String text = new Scanner(connection.getInputStream()).useDelimiter("\\Z").next();

    }
}