Java练习题 6# Java - 爪哇娇娃
u*s
1 楼
int i;
URL url = new URL("http://www.cnn.com");
BufferedInputStream in = new BufferedInputStream(url.openConnection(
).getInputStream());
while( (i=in.read())!=-1 )
{
System.out.print((char)i);
}
A. Compile error
B. Runtime error
C. print the text got from the URL
URL url = new URL("http://www.cnn.com");
BufferedInputStream in = new BufferedInputStream(url.openConnection(
).getInputStream());
while( (i=in.read())!=-1 )
{
System.out.print((char)i);
}
A. Compile error
B. Runtime error
C. print the text got from the URL