Welcome to JavaRanch
We do not simply give out that sort of answer, but we expect you do
do the work, then show us what you have, and we shall tell you what we think of it.
By the way: There is no such thing as a 3-D array in
Java, only 1-D arrays. What you think is a 2-D array is actually a 1-D array of 1-D arrays.
Please check the question you have been given carefully. The code you have posted doesn't look like valid Java. And "function prototype" is a phrase never used in Java syntax. You do however say "function prototype" in C, and that code looks rather like C to me, unless it is supposed to be part of an interface.