Type mismatch exception when using java.math classes on Android -


i need divide 2 bigdecimals in android 2.2 application :

    bigdecimal = new bigdecimal(1);     bigdecimal b = new bigdecimal(3);     bigdecimal c = a.divide(b,2,roundingmode.half_up); 

when executing divide operation following exception :

type mismatch can't assign java.math.roundingmode java.math.roundingmode

i'm using android sdk 2.2 platform , java sdk 1.6.0.24 in ide , program deployed on device running android 2.2.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -