Here is an "answer key" to each of the coding problems

Swap the first and last element in the array

public class ArrayMethods
{
	private static int[] values;
	
	public ArrayMethods (int[] initialValues)
	{
		values = initialValues;
				
	}
	
	/*
	 * Swaps the first and last element in the array
	 */
	public void swapFirstAndLast ()
	{
		int size = values.length;
		int temp = values[size-1];
		values[size-1] = values[0];
		values[0] = temp;

	}

    /*
	 * Prints the arrays
	 */
	public void printArray ()
	{
		for (int i = 0 ; i < values.length ; i++)
		{
			System.out.printf("%d ", values[i]);
		}
		System.out.printf("\n");
	}

    public static void main (String[] Args)
    {
        int[] array = {1, 4, 9, 16, 25};
		
			ArrayMethods arrayMethods = new ArrayMethods(array);
						
            System.out.printf("Original array:\n");
			arrayMethods.printArray();
			arrayMethods.swapFirstAndLast();
            System.out.printf("First and last elements switched:\n");
			arrayMethods.printArray();
    }

}
ArrayMethods.main(null);
Original array:
1 4 9 16 25 
First and last elements switched:
25 4 9 16 1 

Replace all even elements with 0

public class ArrayMethods
{
	private static int[] values;
	
	public ArrayMethods (int[] initialValues)
	{
		values = initialValues;
				
	}

    /*
	 * Replaces every even element with 0
	 */
	public void replaceEvenWith0 ()
	{
		for (int i = 0 ; i < values.length ; i++)
		{
			if (i % 2 == 0)
			{
				values[i] = 0;
			}
		}
	}

	/*
	 * Prints the arrays
	 */
	public void printArray ()
	{
		for (int i = 0 ; i < values.length ; i++)
		{
			System.out.printf("%d ", values[i]);
		}
		System.out.printf("\n");
	}

    public static void main (String[] Args)
    {
		int[] array = {1, 4, 9, 16, 25};
		
		ArrayMethods arrayMethods = new ArrayMethods(array);

		System.out.printf("Original array:\n");
		arrayMethods.printArray();
		
		System.out.printf("Every even element replaced with 0:\n");
		arrayMethods.replaceEvenWith0();
		
		arrayMethods.printArray();			
	}
}
ArrayMethods.main(null);
Original array:
1 4 9 16 25 
Every even element replaced with 0:
0 4 0 16 0 

Return true if the array is currently sorted in increasing order

public class ArrayMethods
{
	private static int[] values;
	
	public ArrayMethods (int[] initialValues)
	{
		values = initialValues;
				
	}

	/*
	 * Returns true if the array is sorted in increasing order
	 */
	public boolean sortIncreasingOrder()
	{
		for (int i = 0 ; i < values.length - 1 ; i++)
		{
			if (values[i] > values[i+1] )
			{
				return false;
			}
		}
		return true;
	}

	/*
	 * Prints the arrays
	 */
	public void printArray ()
	{
		for (int i = 0 ; i < values.length ; i++)
		{
			System.out.printf("%d ", values[i]);
		}
		System.out.printf("\n");
	}

    public static void main (String[] Args)
    {
		int[] array = {1, 4, 9, 16, 25};

		ArrayMethods arrayMethods = new ArrayMethods(array);
		
		System.out.printf("Sorted Order: %b\n", arrayMethods.sortIncreasingOrder());
		arrayMethods.printArray();
	}

}
ArrayMethods.main(null);
Sorted Order: true
1 4 9 16 25 

Return true if the array contains duplicate elements

public class ArrayMethods
{
	private static int[] values;
	
	public ArrayMethods (int[] initialValues)
	{
		values = initialValues;
				
	}

    /*
	 * Returns true if the array has any duplicate elements
	 */
	public boolean duplicates ()
	{
		Arrays.sort(values);
		for (int i = 0 ; i < values.length-1 ; i++)
		{
			if (values[i] == values[i+1])
			{
				return true;
			}
		}
		return false;
	}

		/*
	 * Prints the arrays
	 */
	public void printArray ()
	{
		for (int i = 0 ; i < values.length ; i++)
		{
			System.out.printf("%d ", values[i]);
		}
		System.out.printf("\n");
	}

    public static void main (String[] Args)
    {
		int[] array = {43, 13, 8, 3, 5, 21, 1, 0, 1, 2};
			
		ArrayMethods arrayMethods = new ArrayMethods(array);
		System.out.printf("Before sort: ");
		arrayMethods.printArray();
		
		boolean duplicates = arrayMethods.duplicates();
		
		System.out.printf("After sort: ");
		arrayMethods.printArray();
		System.out.printf("Adjacent duplicate elements: %b\n", duplicates);
	}
}
ArrayMethods.main(null);
Before sort: 43 13 8 3 5 21 1 0 1 2 
After sort: 0 1 1 2 3 5 8 13 21 43 
Adjacent duplicate elements: true