Example 4: Fetch and print the first 30 lines of an HTML page
public static void main(String args[]) {
DataInputStream myURLContent;
myURL = new URL("http://www.cs.nott.ac.uk");
myURLContent = new DataInputStream(myURL.openStream());
System.out.println(myURLContent.readLine());
System.out.println("Error while opening URL");