Calculating Sum of Two Numbers Using Lambda Expression

 

//without Lambda Expression

interface Interf {
    public void sum(int a, int b);
}

class Demo implements Interf {
    public void sum(int a, int b) {
        System.out.println("The sum is : " + (a + b));
    }
}

public class Sum {
    public static void main(String[] args) {
        Interf i = new Demo();
        i.sum(10, 25);
    }
}

//with Lambda Expression

interface Interf {
    public void sum(int a, int b);
}

class Add {
    public static void main(String[] args) {
        Interf i = (a, b) -> System.out.println("The sum : " + (a + b));
        i.sum(10, 15);
    }
}

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