I need to use this function either at Server side or at Client side. If I can convert this code to JavaScript function, then I can use it at the client side, which is much much simpler. If I can't, I've to summit a request to call this function at Server side. I'd prefer use it at client side.
The problem is 2 dimensional array in Java, however in JavaScript, when I try to define 2 dimensional Array, I have a syntax problem. Say how to define this two lines in JavaScript.