Online Java Compiler By
JavaTpoint.com
import java.math.BigDecimal; public class BgDecimalIntValueExample3 { public static void main(String[] args) { // Create BigDecimal object BigDecimal bdValue; //Create int variable int integerValue; //Assigning value into BigDecimal object bdValue = new BigDecimal("3283878343"); //It returns int value of BigDecimal integerValue = bdValue.intValue(); //Displaying int Value System.out.println( "Returned int value is = "+integerValue ); } }
Output