开发者

float java-me j2me [duplicate]

开发者 https://www.devze.com 2023-01-17 03:21 出处:网络
This question already has answers here: 开发者_Python百科 Closed 10 years ago. Possible Duplicate: Java - simple division in Java ---> bug/feature?
This question already has answers here: 开发者_Python百科 Closed 10 years ago.

Possible Duplicate:

Java - simple division in Java ---> bug/feature?

anyone know bigdecimal in j2me midp 2.0?

actually i just want to make j2me app, which is able to compute 1 / 6. and print it as 0.1666667. just like embedded calculator in many(every) mobile phone.

i use float it prints 0.0 i use double it still prints 0.0

many thanks.


@Vuntic: yeah..., this is stupid question ever. @Matt: thx, now i know the answer referring from the link question...

just cast it to float.. (float) 1 / (float) 6

0

精彩评论

暂无评论...
验证码 换一张
取 消