Getting a value associated with a key using key in a LinkedHashMap

 

import java.util.LinkedHashMap;
import java.util.Scanner;

public class HashMapGet {

public static void main(String[] args) {
LinkedHashMap<Integer, String> lhm = new LinkedHashMap<>();
//adding element to our LinkedHashMap
lhm.put(21, "Amit");
lhm.put(5, "Rahul");
lhm.put(13, "Veeru");
lhm.put(34, "Subhash");
lhm.put(19, "Saahil");
System.out.println("Initial mapping is :");
System.out.println(lhm);
Scanner sc = new Scanner(System.in);
System.out.println("Enter the Key to find associated value with it");
int n = sc.nextInt();
System.out.println("The value associated with the entered key is :");
System.out.println(lhm.get(n));
}
}

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