骑着猪去追梦
2017-11-19 15:27
package project6; public class text { public static void main(String[] args) { text emp = new text(); int result = emp.hashCode(); System.out.println("程序执行完毕,结果为:"+result); } public int stadd() { int divider = 10; int result = 100; try { while (divider > -1); divider--; result = (result+100)/divider; }catch(Exception e) { e.printStackTrace(); System.out.println("抛出异常了!!!"); return -1; } return result; } }
while后面是result=result+100/divider
你的方法名字不对啊
Java入门第三季
409792 学习 · 4340 问题
相似问题