import java.net.*; import java.io.*; public class j1{ public static void main(String argv[]){ String str; int i; InputStream is; try{ is = new URL("http://lin2.tpu.ee/~jaagup/keemia/index.htm").openConnection().getInputStream();} catch(Exception e){System.out.println("Viga");} byte b[] = new byte[400]; try{i = is.read(b);} catch(Exception e){System.out.println("Viga2");} if(i!=NULL){str = new String(b,0,0,i);} System.out.println(str); if(is!=NULL){is.close();} }}