Hello readers, in this tutorial, we will learn the operator OR in Java programming language.
Java programming offer Operators that are used to perform various operations . In this tutorial, we’ll only cover the
OR operator that falls under the Conditional and Bitwise category.
1.1 Conditional operators in Java
Following table list the different conditional operators.
|Conditional-OR operator; |
|Conditional-AND operator; |
1.2 Bitwise operators in Java
Following table list the different bitwise operators. These operators are rarely used in a programming language, so we are listing here for knowledge purposes only.
|Bitwise exclusive OR|
|Bitwise inclusive OR|
To start with the captioned tutorial, we are hoping that users at present have their preferred Ide installed on their machines. For easy usage, I am using Eclipse Ide on a Windows operating system.
2. Basic Operators – OR in Java
In this example, we’ll demonstrate the
OR operator. For a better understanding, developers can execute the below code in Eclipse Ide.
If everything goes well, the following output will be printed in the Ide console.
That is all for this tutorial and I hope the article served you whatever you were looking for. Happy Learning and do not forget to share!
In this tutorial, we learned the basic
OR operator. Developers can download the sample application as an Eclipse project in the Downloads section.
This was an example of the operator OR.
You can download the full source code of this example here: Basic Operators – OR in Java