ArithmeticException Java?

后端 未结 8 1858
南旧
南旧 2020-12-06 22:29

Can anyone help me find where the execption is? I can\'t seem to find the problem..

  public void fieldChanged(Field f, int context){
        //if the submit         


        
相关标签:
8条回答
  • 2020-12-06 23:17

    45 / 0 time taken reaches zero and you have division by zero at

    speed = 45/timeInSecs;

    0 讨论(0)
  • 2020-12-06 23:20

    I think there is probably something wrong with startime calculation and it is actually equal to stoptime. Other thing could be the difference is actually going beyond the limit of the integer, probably use a long.

    0 讨论(0)
提交回复
热议问题