RECURSION IS USED in the Program.
finding shortest distance between two points or between a point and a particular cell containing some element lets say #.
the method in the program accept 3 values first one is matrix itself and 2nd and 3rd is the x and y coordinates of starting point.
two additional matrix are required of the same size as they are already defined. Code is simple to understand easy to make changes. All the best to all whoever uses this code.