Iterating over an ArrayList using forEachLoop within a Stream

 

import java.util.ArrayList;
import java.util.function.Consumer;

public class ForEachLoop {

  public static void main(String[] args) {
    ArrayList<Integer> l = new ArrayList<Integer>();
    l.add(10);
    l.add(0);
    l.add(15);
    l.add(5);
    l.add(20);
    l.add(25);
    System.out.println(l);
    Consumer<Integer> c = i -> {
      System.out.println("The squre of " + i + " is:" + (i * i));
    };
    l.stream().forEach(c);
  }
}

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