Question 12:

What is printed when the following main method is executed?

---

public class PrimeOrNot
{
    private static boolean check(int n)
    {
        for(int i = 2; i < n; i++)
        {
            if(n % 1 == 0)
                return false;
        }
        return true;
    }

    public static void main(String[] args)
    {
        int[] arr = {5,3,2,9,3,4};
        for (int i = 0; i < arr.length; i++)
        {
            if(check(arr[i]))
            {
                int temp = arr[0];
                arr[0] = arr[i];
                arr[i] = temp;
            }
        }
        for (int t = 0; t < arr.length; t++)
        {
            System.out.print((arr[t]) + ",");
        }
    }
}

---

A. 2,3,5,9,3,4
B. 4,5,2,3,9,3
C. 5,3,2,9,3,4
D. 2,3,5,9,3
