import java.io.*;
import java.util.*;
class IoTextDemo
{
public static void main(String[] args)
{
//setAndGet();
method_1();
}
public static void method_1() throws IOException
{
BufferedReader bufr = new BufferedReader(new FileReader("SYSTEM_INFO.txt"));
String line = null;
Properties prop = new Properties();
while((line = bufr.readLine()) != null)
{
String[] arr = line.split("=");
prop.setProperty(arr[0],arr[1]);
}
bufr.close();
System.out.println(prop);
}
}
IoTextDemo.java:2232: 错误: 不兼容的类型: IOException无法转换为Throwable
public static void method_1() throws IOException
请问大神们为什么会报这个错,跟老毕的代码一模一样啊
|
|