I am working on a java program that is an optimization problem. The problem is i have this man who wants to go fishing and i have to represent this pond by a 2D array. Also i have to show fish movement during the iterations. I can create the 2D array manually using numbers to represent land=0, water=1, and where fish are present=2. Here is the array at the bottom. I have to optimize the number of fish caught by going to certain locations where fish are present, and this is the part where i get confused. I dont know how to write code for the movement of the fish and how the fisherman gets to those locations, etc. If i could be provided with some syntax for writing 2D arrays it would be helpful
int[][] pond = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,0},
{0,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,0},
{0,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,0},
{0,1,1,1,1,1,1,1,1,1,1,2,2,2,1,2,1,1,1,1,0},
{0,2,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,2,1,0,0},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0},
{0,1,1,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
{0,1,2,1,1,1,2,1,1,2,1,1,1,1,1,1,1,1,1,2,0},
{0,2,2,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };