If you use plain arrays, you would need to loop through the elements. Consider using a Matrix package, e.g. http://math.nist.gov/javanumerics/jama/.
Something like (assuming a is a 2d-array):
import Jama.*
Matrix A = new Matrix(a);
Matrix B = new Matrix(b);
Matrix R = A.minus(B);