This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
Here is a class that solves linear equation system with LU-decomposition algorithmus. I got the error message when ran it: Please enter an integer as the size of the matrix: 5 java.lang.ArrayIndex OutOfBoundsException: 5 at NB2A71.main(NB2A71.java:31) Press any key to continue... The source code is as following:
In this program, the initial values of a[i][j] and b[i] are specified here:
How should I modify the code so that it can run? Thank you very much in advance!