Your post looks like a homework problem. We don't like to do other's people's homework - homework is meant for you to learn, and you won't learn anything when somebody else does it for you. So, please DoYourOwnHomework.
So, do you understand the question in your assignment? Did you already write some code yourself? Where do you get stuck? If you want to learn how arrays work in Java, then have a look at Arrays in Sun's Java Tutorials.