Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.DataInputStream;
import java.net.URL;

public class Main {

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

        String thisLine;
        URL u = new URL("http://www.google.com");
        DataInputStream theHTML = new DataInputStream(u.openStream());
        while ((thisLine = theHTML.readLine()) != null) {
            System.out.println(thisLine);
        }

    }

}