Re: yasq

From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 01/17/04

  • Next message: Tony Morris: "Re: Hello World"
    Date: 16 Jan 2004 17:20:01 -0800
    
    

    "martin" <nobody@nowhere.org> wrote in message news:<bu97u9$cqg$1@reader11.wxs.nl>...
    > ... = yet another simple question. ;-))
    >
    > when I have -for example- a 'double' variable with value
    > 231.6847987639475639876478 etc...
    >
    > How can I have it printed on screen as 231.685 ?
    > or as 2.3e+2 ?
    >
    > in general: How can I set the format in which floats (or other var's) are
    > printed on screen?
    >
    > thanx in advance!
    > martin

    Use java.text.DecimalFormat. Its usage is quite simple and easy.


  • Next message: Tony Morris: "Re: Hello World"