当我输入一个数组之中没有的数据来执行这段查找程序的时候,就会出现如下的报错信息
Exception in thread "main" java.lang.ArithmeticException: / by zero
at RobustInterpolationSearch.findRobust(RobustInterpolationSearch.java:4
6)
at RobustInterpolationSearch.robustInterpolationSearch(RobustInterpolati
onSearch.java:80)
at RobustInterpolationSearch.main(RobustInterpolationSearch.java:28)
Exception in thread "main" java.lang.ArithmeticException: / by zero
at RobustInterpolationSearch.findRobust(RobustInterpolationSearch.java:4
6)
at RobustInterpolationSearch.robustInterpolationSearch(RobustInterpolati
onSearch.java:80)
at RobustInterpolationSearch.main(RobustInterpolationSearch.java:28)
解决方案 »
- 初学请教各位摆脱了。
- java2D:请问,如何在图形上实现双击可添加文本
- 在weblogic/webshpere下开发和TOMCAT有区别吗
- 不知道那里出了问题 请教各位 多谢
- 如何对图像进行像素级的操作?
- 开发过sip servlet的进来看看!
- 文件操作
- ********************请问哪里能下载JBUILDER6以上版本呀************************
- java里如果有构造函数,是不是在运行main函数之前构造函数就要运行一下?
- 我在客户端运行有些applet时,总是什么也不显示!是否需要安装一个插件?如何配置?谢了!给分
- 保存的问题?在线等///
- 如果1个方法中的参数类型是对象类型,那么这个参数可以接受一个该对象类型的子类的对象吗?
Number3= Low+(KeyValue-Data[Low])*(High-Low)/(Data[High]-Data[Low]);
while(Low<=High)
改成
while(Low<High)
就可以了
我这是在用JAVA写数据结构的习题,这段程序是插补查找