
I want to parse a BigInteger class variable into integer like BigInteger p = BigInteger.valueOf(10); now i want to convert p value into int . I searched so many times on google to solve this problem but i found no solution so please somebody help me to solve this problem .I am the beginner in java

import java.math.*;
class ConvertBigIntegerToInt
{
public static void main(String[] args)
{
BigInteger p = BigInteger.valueOf(10);
String number=p.toString();
int num=Integer.parseInt(number);
System.out.println(num);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.