Kindly help me in understanding the following code,
BigDecimal d = new BigDecimal(000100);
System.out.println(d); // output is 64!!!!
BigDecimal x = new BigDecimal(000100.0);
System.out.println(x); // output is 100
Shouldn't we use BigDecimal to process int or long value in any scenario? (I mean leave about performance and stuff, I know its not advisable to use BigDecimal to process only int or long). My data has mix of both long and decimal values, so am trying to know about BigDecimal.