Get All Possible Available Currencies

前端 未结 8 1664
忘了有多久
忘了有多久 2021-02-05 09:17

I would like to get all possible available currencies.

Java 7 had provided such feature.

public static Set java.util.Currency.g         


        
8条回答
  •  情话喂你
    2021-02-05 09:32

    You can also use the library nv-i18n available on maven:

    
        com.neovisionaries
        nv-i18n
        1.22
    
    

    To see all currency codes with it, you just have to use:

    for (CurrencyCode code : CurrencyCode.values()) {
        System.out.format("[%s] %03d %s\n", code, code.getNumeric(), code.getName());
    }
    

    You can see more details about this class and library here: http://takahikokawasaki.github.io/nv-i18n/

提交回复
热议问题