1 year ago

#381682

test-img

Rizen_137

How to use BigInteger with Comparison operators in java

I want to use BigInteger in if statement. But BigInteger needs to convert to int for compare with integer data type. how to convert BigInteger as a int.

This is my buggy code.

    Scanner in = new Scanner(System.in);
    BigInteger input = in.nextBigInteger();
     
    if(input <= 127 )
    {
       //code 
       
    }

java

biginteger

0 Answers

Your Answer

Accepted video resources