Suggest me a method to take character matrix as input in Java.
For example, consider the below matrix:
. . * .
. # . .
* * . .
. # * *
Above is a charcater matrix containing '.','*' and '#' as different characters. Not only for this one, please suggest me a method which can take any character matrix of size m x n .