|| operator in Java Last Updated : 01 Nov, 2020 Comments Improve Suggest changes Like Article Like Report || is a type of Logical Operator and is read as "OR OR" or "Logical OR". This operator is used to perform "logical OR" operation, i.e. the function similar to OR gate in digital electronics. One thing to keep in mind is the second condition is not evaluated if the first one is true, i.e. it has a short-circuiting effect. Used extensively to test for several conditions for making a decision.Syntax: Condition1 || Condition2 // returns true if one of the conditions is true. Below is an example to demonstrate || operator:Example: Java // Java program to illustrate // logical OR operator import java.util.*; public class operators { public static void main(String[] args) { char ch = 'a'; // check if character is alphabet or digit // using || operator if (ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) System.out.println( ch + " is an alphabet."); else if (ch >= 48 && ch <= 57) System.out.println( ch + " is a digit."); else System.out.println( ch + " is a special character."); } } Output: a is an alphabet. Comment More infoAdvertise with us Next Article || operator in Java C code_r Follow Improve Article Tags : Java Java-Operators Practice Tags : JavaJava-Operators Similar Reads dot(.) Operator in Java The dot (.) operator is one of the most frequently used operators in Java. It is essential for accessing members of classes and objects, such as methods, fields, and inner classes. This article provides an in-depth look at the dot operator, its uses, and its importance in Java programming.Dot(.) Ope 4 min read Java Operators Java operators are special symbols that perform operations on variables or values. These operators are essential in programming as they allow you to manipulate data efficiently. They can be classified into different categories based on their functionality. In this article, we will explore different 15 min read Shift Operator in Java Operators in Java are used to performing operations on variables and values. Examples of operators: +, -, *, /, >>, <<. Types of operators: Arithmetic Operator,Shift Operator,Relational Operator,Bitwise Operator,Logical Operator,Ternary Operator andAssignment Operator. In this article, w 4 min read Basic Operators in Java Java provides a rich operator environment. We can classify the basic operators in java in the following groups: Arithmetic OperatorsRelational OperatorsBitwise OperatorsAssignment OperatorsLogical Operators Let us now learn about each of these operators in detail. 1. Arithmetic Operators: Arithmetic 10 min read Bitwise Operators in Java In Java, Operators are special symbols that perform specific operations on one or more than one operands. They build the foundation for any type of calculation or logic in programming.There are so many operators in Java, among all, bitwise operators are used to perform operations at the bit level. T 6 min read Like