Ooh … Begitu! I see, I see …


Setelah kelayapan di internet, cari-cari info dari sana-sini dan bongkar pasang tips (terutama programming), akhirnya baru sadar … ternyata begitu caranya … [all about tricks and tips I have found during my work as programmer.]

cast Double to String in java

Double to String casting …
if you want to display its String in number format (like this ###,###,##0.00) do not use these lines …

    Double sk = 12300000000.35;

they would result like these ones:


use this one instead.

    Double sk = 12300000000.35;
    NumberFormat nm = NumberFormat.getNumberInstance();


the latter result would be this:


Filed under: Java programming, , , , , , ,

One Response

  1. Kaka says:

    wow, excellently explained. This was Exactly what I was looking for. Thank you very much. Please keep it up. You have been very helpful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: