奇怪的问题:Exception is not compatible with throws clause !会者很easy!
mint 2007-07-12 11:48:24 public class LoadMaps implements ContentMaps {
....
public MAP getUserMap(int localID) throws Exception{
// TODO Auto-generated method stub
MAP map=new MAP();
...
Oracle newConnection=new Oracle();
Connection conn= newConnection.newConnection();
try{
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql="select * from MAP_PIN where LocalID='"+localID+"'";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()){
... };
rs.close();
stmt.close();
}
finally{
if(conn!=null){conn.close();}
}
return map;
}
}
结果提示:
Exception Exception is not compatible with throws clause in ContentMaps.getUserMap(int)
不明白为什么,请高手指点!