In a method I remember there was an error thrown at a line having the following code.
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer
at
Integer count = (Integer) result[1];
and I replaced the code to
Integer count = ((BigDecimal) result[1]).intValue();
the error has gone.
But some how I got the following error for the same code snippets in the new project.
java.lang.ClassCastException: java.math.BigDecimal incompatible with java.lang.Integer
Just wanted to know, both of these are the same or not.