Deleting a specific element from a given Array

 

import java.util.*;
public class RemoveSpecificElement {
public static void main(String args[]) {
int my_arr[] = { 1, 2, 3, 4, 5, 7, 8, 9, 10 };
System.out.println("The given Array is : " + Arrays.toString(my_arr));
Scanner sc = new Scanner(System.in);
System.out.println("Enter the element to be removed");
int n = sc.nextInt();
int removeIndex = 0;
for (int i = 0; i < my_arr.length - 1; i++) {
if (my_arr[i] == n) {
removeIndex = i;
}
}
for (int i = removeIndex; i < my_arr.length - 1; i++) {
my_arr[i] = my_arr[i + 1];
}
System.out.println("The Updated Array is : " + Arrays.toString(my_arr));
} // last element will be repeated because we cannot alter the size of an array
}

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