import java.util.*;
public class CheckFirstLastElement {
public static void main(String args[]) {
int myarr1[] = { 50, -20, 0, 30, 40, 60, 10 };
int myarr2[] = { 50, -20, 0, 30, 40, 60, 50 };
System.out.println(compareElement(myarr1));
System.out.println(compareElement(myarr2));
}
public static boolean compareElement(int arr[]) {
int n = arr.length;
// System.out.println(n);
if (n >= 2 && arr[0] == arr[n - 1]) {
return true;
} else {
return false;
}
}
}