UPDATE:
You have a resultset with 2 columns.
Object[] result= query.list().get(0); BigDecimal number1 = (BigDecimal) result[0]; BigDecimal number2 = (BigDecimal) result[1]; UPDATE:
You have a resultset with 2 columns.
Object[] result= query.list().get(0); BigDecimal number1 = (BigDecimal) result[0]; BigDecimal number2 = (BigDecimal) result[1];