Java BigInteger clearBit() MethodThe clearBit() method of Java BigInteger classreturns a BigInteger which corresponds to the result of clearing a bit designated by the method argument n. Syntax:Parameter:n-index of bit to clear entered by user Returns:This method returns a bigInteger of value,(this &~(1<<n)). Throws:ArithmeticException - if n is negative. Example 1Test it NowOutput: Result of clearBit operation on 15 is 11 Example 2Test it NowOutput: java.lang.ArithmeticException: Neagtive bit address 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