2001/04/03 (火) 01:43:16 ◆ ▼ ◇ [mirai]public class Test {
public static void main(String[] args) {
InputStream urlis;
BufferedReader urlin;
try {
urlis = new URL("HTTP://www.yahoo.com/").openStream();
} catch(MalformedURLException mue) {
mue.printStackTrace(System.out);
} catch(IOException ioe) {
ioe.printStackTrace(System.out);
}
urlin = new BufferedReader(
new InputStreamReader(urlis)
);
try {
for (;;) {
System.out.print(urlin.readLine());
}
} catch(IOException ioe) {
ioe.printStackTrace();
}
System.exit(0);
}
}
なあ、どうしてもコンパイルできないんだよ。なんで?
Test.java [26:1] Variable urlis may not have been initialized.
new InputStreamReader(urlis)
^
1 error
って出る