Comparing Strings using compareTo method

 import java.util.*;


public class CompareString{
public static void main(String args[]){
String str1 = "This is string exercise 1";
String str2 = "This is string exercise 2";

int result = str1.compareTo(str2);

if(result == 0){
System.out.println(str1+"is equal to "+str2);
} else if(result >0){
System.out.println(str1+" "+" "+"is greater than"+" "+ " "+str2);
} else {
System.out.println(str1+" "+"is less than"+" "+str2);
System.out.println("\"" + str1 + "\"" +
" is less than " +
"\"" + str2 + "\"");
}
}
}

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