Searching Penultimate word in a string

 import java.util.*;


public class PenultimateWord{
public static void main(String args []){
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
String [] word = str.split("[ ]+");
int i = word.length;
System.out.println("Penultimate Word "+word[i-2]);
}
}

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