Comparing Two TreeSet

 

import java.util.Iterator;
import java.util.TreeSet;
import java.util.Set;

import javax.management.monitor.StringMonitor;

public class TreeSetEquals {
public static void main(String[] args) {
// creating our TreeSet
Set<String> ts = new TreeSet<>();
// adding element to our set
// insertion order is maintained here
ts.add("Neha");
ts.add("Nisha");
ts.add("Nishu");
ts.add("Rekha");
ts.add("Madhu");
ts.add("Disha");
ts.add("Tara");
ts.add("Tara"); // duplicate element can't be added

// creating another TreeSet
Set<String> ts1 = new TreeSet<>();
// adding element to our set
// insertion order is maintained here
ts1.add("Neha");
ts1.add("Nisha");
ts1.add("Nishu");
ts1.add("Rekha");
ts1.add("Madhu");
ts1.add("Disha");
ts1.add("Tara");

System.out.println(ts.equals(ts1));

}
}

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