Acquiring a country's currency code

后端 未结 4 654
逝去的感伤
逝去的感伤 2020-12-19 11:45

I have a problem getting a country\'s currency code. My task is to get the user\'s location, find out what country he is right now and get this country\'s currency code. Her

4条回答
  •  旧巷少年郎
    2020-12-19 12:01

    You should be able to use Currency.getInstance(new Locale("",code)), with a possible Exception if the country code isn't valid.

提交回复
热议问题