Adding element to a TreeMap and iterating using iterator and printing its key-value set

 

import java.util.Iterator;
import java.util.TreeMap;

public class TreeMapPut {

public static void main(String[] args) {
//creating our tree map
TreeMap<Integer, String> tm = new TreeMap<>();
//Inserting element in our TreeMap
tm.put(17, "this");
tm.put(13, "Invent");
tm.put(18, "blog");
tm.put(16, "on");
tm.put(15, "you");
tm.put(14, "welcomes");
tm.put(12, "Java");

Iterator itr = tm.keySet().iterator();
while (itr.hasNext()) {
Integer key = (Integer) itr.next();
String value = tm.get(key);
System.out.println(key + "---->" + value);
}
}
}

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