Finding the index of an element in an ArrayList using built-in function (contains)

 

import java.util.*;

public class LinkeListOper2 {

public static void main(String args[]) {
LinkedList<String> ll = new LinkedList<>();
ll.add("john");
ll.add("kiyan");
ll.add("kayna");
ll.add("cristy");
Scanner sc = new Scanner(System.in);
System.out.println("Enter the element from the list whose index you want to know");
System.out.println("The List is : " + ll);
String str = sc.nextLine();
int index = ll.indexOf(str);
System.out.println("Index of " + str + " is = " + index);
}
}

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