LargeInteger
に相当するものはありBigInteger
ますtestBit
か?
そうでない場合、どのようtestBit
に実行できますLargeInteger
か?
私はまだ再現するのに必要なスキルを持っていません((this & (1<<n)) != 0)
。
ドキュメントから参照されている上記のコードをコピーして貼り付けるだけでメソッドを作成しようとしました:
static boolean testBit(int n){
return ((this & (1<<n)) != 0);
}
ただし、コンパイラは次のように報告します。
error: non-static variable this cannot be referenced from a static context
return ((this & (1<<n)) != 0);
^
error: bad operand types for binary operator '&'
return ((this & (1<<n)) != 0);
^