Combining elements of two HashMap using in-built method putAll()

 

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class HashMapPutAll {

public static void main(String[] args) {
//Creating HashMap;
Map<Integer, String> hm = new HashMap<>();
//Putting element
hm.put(1, "Naidu");
hm.put(3, "Rohilla");
hm.put(5, "Vijay");
hm.put(2, "Rahul");
hm.put(4, "Ramakesh");
hm.put(6, "Sudeep");
hm.putIfAbsent(7, "Badrabahu");

HashMap<Integer,String> hm1 = new HashMap<>();
//must value must not be same to use putAll() method
hm1.put(8,"language");
hm1.put(9,"java");
hm1.put(10,"bike");

hm.putAll(hm1);
System.out.println(hm);
}
}

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