How do I convert scientific notation to regular int For example: 1.23E2 I would like to convert it to 123
Thanks.
Check out DecimalFormat.parse().
Sample code:
DecimalFormat df = new DecimalFormat(); Number num = df.parse("1.23E2", new ParsePosition(0)); int ans = num.intValue(); System.out.println(ans); // This prints 123