Program: Write array methods that carry out the subsequent tasks for an array of integers by completing the ArrayMethods class below. Test each method.
public class ArrayMethods {
private int[] values;
public ArrayMethods(int[] initialValues){
values = initialValues;
}
//all even elements are moved to the front of the array
//otherwise, order is preserved
public void moveEvens() { ... }
//returns true if the array contains duplicate elements
//returns false if all elements are distinct
public boolean duplicates() { ... }
}
You need to implement array in java. Make this program using java programming. Make this program in simple way.