Logical And Operator Example Java Program
Definition
Logical conjunction is an operation on two logical values, typically the values of two propositions, that produces a value of true if and only if both of its operands are true. The conjunctive identity is 1, which is to say that AND-ing an expression with 1 will never change the value of the expression. In keeping with the concept of vacuous truth, when conjunction is defined as an operator or function of arbitrary arity, the empty conjunction (AND-ing over an empty set of operands) is often defined as having the result 1.Logical And Operator Example Program
class LogicalAndOperator{ public static void main(String[] args){ int num1,num2; num1=43; num2=30; System.out.println("Input numbers are num1=43 and num2=30"); if(num1==43&&num2==30){ System.out.println("Both num1 and num2 satisfy the condition"); } } }
Sample Output
Output is: Input numbers are num1=43 and num2=30 Both num1 and num2 satisfy the condition
Operator Programs
- Addition Operator Example Java Program
- Division And Assignment Operator Example Java Program
- Modulus And Assignment Operator Example Java Program
- Equal To And Not Equal To Operator Example Java Program
- Greater Than Operator Example Java Program
- Lesser Than Operator Example Java Program
- Increment Operator Example Java Program
- Decrement Operator Example Java Program
- Logical And Operator Example Java Program
- Logical Or Operator Example Java Program
- Instance Of Operator Example Java Program
- Subtraction Operator Example Java Program
- Ternary Operator Example Java Program
- Multiplication Operator Example Java Program
- Division Operator Example Java Program
- Modulus Operator Example Java Program
- Assignment Operator Example Java Program
- Addition And Assignment Operator Example Java Program
- Subtraction And Assignment Operator Example Java Program
- Multiplication And Assignment Operator Example Java Program
Read More Articles
- Multiple Inheritance Using Interface Example Java Program
- Single Inheritance Example Java Program
- Multilevel Inheritance Example Java Program
- Hierarchical Inheritance Example Java Program
- Find all Substrings of a given string Example Java Program
- Create Matrix Example Java Program
- Sum Of Three Numbers Example Java Program
- Heap Sort Example Java Program
- Twin Prime Example Java Program
- Compile Time Polymorphism Example Java Program