Logical Operator


 public class LogicalOperators {
public static void main(String args[]) {

// Logical operators &, |;

boolean a = true;
boolean b = false;
// All these operators will return either true or false
// &(and operator) i.e result will be true if both input are true
System.out.println("And operator Result");
System.out.println(a & b); // false as b is false;
System.out.println(b & a); // false as b is false;
System.out.println(b & b); // false as b is false;
System.out.println(a & a); // true as a is true;

      // |(Pipe operator) i.e or operator;
        result will be true if either input is true
System.out.println("Pipe operator Result");
System.out.println(a | b);
System.out.println(b | a);
System.out.println(b | b);
System.out.println(a | a);
}
}

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