Java tutorial
import java.math.BigDecimal; public class Main { public static void main(String[] args) { BigDecimal bg = new BigDecimal("1234.123456"); Float f = bg.floatValue(); System.out.println(f); } }