Add Java version with floating-point support