import static java.lang.System.out;
public class currencyTest{
public static void main(String args[]){
/**
*the java.util.Currency class does not provide a
*public constructor, therefore you can obtain an
*instance by calling the getInstance(...) method
*/
java.util.Currency venezuelasCurrency =
java.util.Currency.getInstance(
new java.util.Locale("es", "ve"));
out.printf("The currency symbol for venezuela
is %s%n", venezuelasCurrency.getSymbol());
}
}
Imprime:
The currency symbol for venezuela is BsF.
No hay comentarios:
Publicar un comentario