I want to implement a matrix inversion program in Java. It takes a square matrix as input and returns the inverse of it.