import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.
import java.net.URL;
import java.net.URLConnection;
public class URLAccess {
public static void main(String[] args) { p>
try {
test();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e. printStackTrace();
}
}
public static void test() throws IOException {
URL url = new URL("");
System.out. println("================== following content for the website ==================");
URLConnection urlcon = url.openConnection();
int i = urlcon. getContentLength();
if (i > 0) {
InputStream is = urlcon.getInputStream();
int a;
while ((a = is.read()) ! = -1) {
System.out.print((char) a);
}
is.close();
} else {
System.out.println("Response is empty...") ;
}
}
}