public static String Digituppercase (double n) {
String fraction[] = {"Angle", "Minute"};
String digit[] = {"0", "one", "II", "three", "premises", "WU", "Lu", "Qi", "ba", "JIU"};
String unit[][] = {{"meta", "Million", "billion"},
{"", "Pick", "Bai", "Thousand"}};
String head = N < 0? "Negative": "";
n = Math.Abs (n);
String s = "";
for (int i = 0; i < fraction.length; i++) {
s + = (digit[(int) (Math.floor (n * * MATH.POW (ten, I)%)] + fraction[i]). ReplaceAll ("(0.) +", "");
}
if (S.length () <1) {
s = "whole";
}
int integerpart = (int) math.floor (n);
for (int i = 0; i < unit[0].length && integerpart > 0; i++) {
String p = "";
for (int j = 0; J < unit[1].length && n > 0; j + +) {
p = digit[integerpart%10]+unit[1][j] + p;
Integerpart = INTEGERPART/10;
}
s = P.replaceall ("(0.) * 0 $ "," "). ReplaceAll (" ^$ "," 0 ") + unit[0][i] + s;
}
Return head + s.replaceall ("(0.) * 0 Yuan "," Yuan "). Replacefirst (" (0.) + "," "). ReplaceAll (" (0.) + "," 0 "). ReplaceAll (" ^ Full $ "," 0 yuan whole ");
}
Java digital Amount converted to Chinese amount