SHARE
TWEET

Untitled

a guest Sep 17th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val format = NumberFormat.getCurrencyInstance(Locale.GERMANY) // getDefault()
  2.     format.maximumFractionDigits = 2
  3.     format.currency = Currency.getInstance("EUR")
  4.     val result = format.format(2.8)
  5.     println("result $result")
  6.  
  7.     val curr = Currency.getInstance("EUR")
  8.     val symbol = curr.getSymbol(Locale.GERMANY) // on device getDefault()
  9.     println("Currency symbol is = $symbol")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top