Comparing first and last element of a given Array

 public class CompareFirstAndLastEle {


public static void main(String args[]) {
int arr[] = { 10, 12, 13, 14, 2, 3, 5, 1 };
int firEle = arr[1];
int lastEle = arr[arr.length - 1];
if (firEle > lastEle) {
System.out.println("First element of the given Array is greater");
} else {
System.out.println("Last element of the given Array is greater");
}
}
}

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...