Finding the size of a given LinkedHashSet

 

import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;

public class LinkedHashSetSize {

public static void find_Size(Set<String> set) {

System.out.println("The Size of the given set is = " + set.size());

}

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

// creating another LinkedHashSet
Set<String> lhs1 = new LinkedHashSet<>();

find_Size(lhs);
find_Size(lhs1);
}
}

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