
Hi, I am trying to print the number as per locale. I tried below, but it still prints in English locale.
public class loctest {
public static void main(String[] args){
Locale.setDefault(Locale.CHINESE); //set chinese defaullt locale System.out.println(Locale.getDefault()); //returns zh.
//format the number as per locale --> currently chinese System.out.println(String.format(Locale.getDefault(),"%d",123));
} } //output: zh 123 Am I doing anything wrong?
Thanks. Amit