- public class test {
- public static String[] chineseDigits = new String[] { "零", "壹", "贰", "叁",
- "肆", "伍", "陆", "柒", "捌", "玖" };
- public static String[] column = new String[]{"万","亿","兆"};
- public static void main(String[] args) {
- int[] row = new int[]{1,2,3,1};
- for (int i = 0; i < row.length; i++) {
-
- String finalValues = chineseDigits[row[i]]+column[i];
-
- System.out.println(finalValues);
- }
- }
复制代码 总是爆String finalValues = chineseDigits[row]+column;这一行数组下标越界,跪求帮助{:soso__1620823281082563426_2:} |