And makes it possible to compare 2 values

package ArithmeticOperations;

public class And {
	void start() {
		boolean result = (1<7 && 1<8);
	}

	public static void main(String[] args) {
		new And().start();
	}
}

Result will be: true

You can best compare at most 2 values

that is best for:

  • the cleanness of your code;
    • for other people it will be harder to read your code
  • the¬†effectiveness of your code;
    • sometimes will a statement with 3 operands ( .. && .. && .. ), not successfully be executed. It shows false or true when this is not the case.