A simple program array procedure write in Java