Java BigInteger or() MethodThe or() method of Java BigInteger class is used to find the Bitwise OR of two BigIntegers. This method returns a BigInteger whose value is (this | val). Syntax:Parameter:val - value to be OR'ed with this BigInteger. Returns:This method returns (this | val). Exception:NA Note: This method returns a negative BigInteger if and only if either this or val is negative.Example 1Test it NowOutput: OR operation on 8 and 2 gives 10 Example 2Test it NowOutput: OR operation on 8 and -2 gives -2 Example 3Test it NowOutput: OR operation on -8 and -2 gives -2 Next TopicJava BigInteger |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India