请大家给出一个抛出错误,截获错误的例子,谢谢 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 throw new Exception();try{;}catch(Exception e){;} try{ int a=1/0;}catch(Exception ){ System.out.println(e.toString);} public class T{ public static throwException()throws Exception{ int a=1/0; } public static void main(String args[]){ try{ throwException(); }catch(Exception e){ System.out.println(e.toString); } }} public static throwException()throws Exception改成public static void throwException()throws Exception 这叫异常,不叫错误,异常和错误是不一样的,异常是Exception,但错误是Error,两个是完全不一样的概念。 各位大虾 帮帮忙 我刚学Java java简单的小疑问,请求帮忙! JDBC关闭连接———一个灰封多年的问题!!! 第一次发帖 多请指教 关于多线程的两道选择题 如何用给定的密码进行加密啊?请大虾们给点指导! 求助:哪位大侠有rationalrose的crack文件,版本是RationalRoseEnterpriseEdition.2001.03.00.271.000 这儿送分! 请问一个简单的关于二维数组的问题 100分相似!!!十万火急!!利用socket如何与http服务器通讯??????? java向mysql中插入中文出现乱码的问题
try{
;
}catch(Exception e)
{
;
}
int a=1/0;
}catch(Exception ){
System.out.println(e.toString);
}
public static throwException()throws Exception{
int a=1/0;
}
public static void main(String args[]){
try{
throwException();
}catch(Exception e){
System.out.println(e.toString);
}
}
}
public static void throwException()throws Exception