This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public final class M2NUtil { | |
| private static char[] array = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| .toCharArray(); | |
| public static String m2n(int number, int n) { | |
| // String 是不可变的,每次改变都要新建一个Strng,很浪费时间。 | |
| // StringBuilder是‘可变的String’ , | |
| StringBuilder result = new StringBuilder(); | |
| // 模拟计算进制的过程 |