Java-math-biginteger-flipbit
提供:Dev Guides
Java.math.BigInteger.flipBit()メソッド
説明
- java.math.BigInteger.flipBit(int n)*は、指定されたビットが反転されたこのBigIntegerと同等の値を持つBigIntegerを返します。 計算します(this ^(1 << n))。
宣言
以下は* java.math.BigInteger.flipBit()*メソッドの宣言です。
パラメーター
戻り値
このメソッドは、値がthis ^(1 << n)であるBigIntegerオブジェクトを返します。
例外
例
次の例は、math.BigInteger.flipBit()メソッドの使用法を示しています。
上記のプログラムをコンパイルして実行すると、次の結果が生成されます-