Example usage:
Matrix A = Matrix.random(5, 5);
Matrix b = Matrix.random(5,1);
System.out.println("Matrix X - Testing the solve method (X = A^-1 * b)");
double X = Math.pow(A,-1) * b;
Matrix L= Matrix.solve(X);
Also, look at other various eaxmple of Matrix.solve here:
https://www.codota.com/code/java/methods/Jama.Matrix/solve[
^]. It has online editor too to play around.