由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Java练习题 7
相关主题
Java练习题 6Re: How can I call another program from Java?
怎么从键盘输入整数或float?Windows 下 Java console application 的问题
关于char和int的问题新手请教怎样在Java里读文本文件中的内容
Process的问题JAVA文本文件读写问题
Java练习题 11Brainbench test (转载)
How to write a file to the same directory of the class file?URL 的问题怎么解决?
InputStream.read() 被block的问题(陷入无限等待)用eclipse运行java, 关闭后无相应问题
java applet读网络文件的问题Java练习题 4
相关话题的讨论汇总
话题: url话题: add话题: new
进入Java版参与讨论
1 (共1页)
u****s
发帖数: 2186
1
int i;
URL url = new URL("http://www.cnn.com");
InputStream input = url.openConnection().getInputStream();
//add a line here
while( (i=in.read())!=-1 )
{
System.out.print((char)i);
}
Add which of the following line to the above 'add a line here
will print out the context of the website
A. BufferedInputStream in = new BufferedInputStream(input);
B. BufferedReader in = new BufferedReader(new InputStreamReader(input
));
C.
q*********u
发帖数: 280
2
b
你这些题是不是brainbench上面的阿

int i;
URL url = new URL("http://www.cnn.com");
InputStream input = url.openConnection().getInputStream();
//add a line here
while( (i=in.read())!=-1 )
{
System.out.print((char)i);
}
Add which of the following line to the above 'add a line here
will print out the context of the website
A. BufferedInputStream in = new BufferedInputStream(input);
B. BufferedReader in = new BufferedReader(new InputStr

【在 u****s 的大作中提到】
: int i;
: URL url = new URL("http://www.cnn.com");
: InputStream input = url.openConnection().getInputStream();
: //add a line here
: while( (i=in.read())!=-1 )
: {
: System.out.print((char)i);
: }
: Add which of the following line to the above 'add a line here
: will print out the context of the website

u****s
发帖数: 2186
3
more than one answer
try it
g**e
发帖数: 6127
4
同问

【在 q*********u 的大作中提到】
: b
: 你这些题是不是brainbench上面的阿
:
: int i;
: URL url = new URL("http://www.cnn.com");
: InputStream input = url.openConnection().getInputStream();
: //add a line here
: while( (i=in.read())!=-1 )
: {
: System.out.print((char)i);

u****s
发帖数: 2186
5
不是,但应该类似

【在 g**e 的大作中提到】
: 同问
s***8
发帖数: 1136
6
b c
u****s
发帖数: 2186
7
I think it is
A B C
1 (共1页)
进入Java版参与讨论
相关主题
Java练习题 4Java练习题 11
Java练习题 9How to write a file to the same directory of the class file?
Java练习题 10InputStream.read() 被block的问题(陷入无限等待)
Java 入门求教java applet读网络文件的问题
Java练习题 6Re: How can I call another program from Java?
怎么从键盘输入整数或float?Windows 下 Java console application 的问题
关于char和int的问题新手请教怎样在Java里读文本文件中的内容
Process的问题JAVA文本文件读写问题
相关话题的讨论汇总
话题: url话题: add话题: new