View Single Post
Old Jun 13th, 2006, 3:23 PM   #7
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 928
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
You can simplify this function as follows, such that you don't declare unnecessary variables.

private static String makeStr(int num) {
    String s1 = String.valueOf((char)('a' + num / 26));
    String s2 = String.valueOf((char)('a' + num % 26));
    return s1 + s2;
}
titaniumdecoy is offline   Reply With Quote