matrix,
one easy way to predict is to see if any of your numberic formula are ever divided by zero.
If you find one, it can throw an ArithmeticException exception. By enclosing the formula in a try/catch block, you can take care of the error ahead of time, in case it happens.
Also, if any of your variables haven't been initialized, they might throw an exception (NullPointerException maybe. not sure),
If any of your arrays go past there limits
(array[] with 2 objects, but you try and call the object located at array[2], which doesn't exist), it could throw ArrayIndexOutOfBounds exception, i think.
Hope this helps
TB