private Boolean isEven(BigDecimal decimal,int precision){
  BigDecimal tempValue=decimal;
  int i=0;
  while (++i <= precision)   tempValue=tempValue.multiply(new BigDecimal(10));
  return (tempValue.intValue() & 1) == 0;
}

private Boolean isEven ( BigDecimal decimal , int precision ) { BigDecimal tempValue = decimal ; int i = 0 ; while ( ++ i <= precision ) tempValue = tempValue . multiply ( new BigDecimal ( 10 ) ) ; return ( tempValue . intValue ( ) & 1 ) == 0 ; }
returns even no or not , logic here is multiply by 10 until you ' ve reached the desired precision ( number of digits after the . ) , then use bitwise comparison
