Write a program to demonstrate the use of the logical operators in java.
Answers
Answered by
0
Answer:
Java OR Operator Example: Logical || and Bitwise |
class OperatorExample{
public static void main(String args[]){
int a=10;
int b=5;
int c=20;
System.out.println(a>b||a<c);//true || true = true.
System.out.println(a>b|a<c);//true | true = true.
//|| vs |
Similar questions
Social Sciences,
2 months ago
Math,
2 months ago
Math,
5 months ago
Math,
5 months ago
Political Science,
10 months ago
Hindi,
10 months ago