Comparing first and last Element of an Array

 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;
}
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...