Java program to delete specified integer from an array