用ASC码方法好了
  A=63把好像
然后你就1+。。然后用CHAR打出不就可以了
这样行不

解决方案 »

  1.   

    char intToChar(int i){
        char c = (char)(i + 64);
        return c;
    }
      

  2.   

    up 楼上的先import java.io.*;
    public class convert{
            public static void main( String[] args ){
            System.out.println( "Please input the number(1-26):");
            int number = 0;
            
         try{ 
            number = 16+(int)System.in.read();
           
           }
         catch(IOException e)
          {}  
    System.out.println( "output char(A-Z):"+(char)number+"\n");

    }
    }
      

  3.   

    import java.io.*;
    public class Comput{
    public void run() throws IOException{
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    System.out.println("enter 1~26");
    String numstu = reader.readLine();
    int num = Integer.parseInt(numstu)+64;
    char a = (char)num;
    System.out.println(a);
    }
    public static void main(String[] args) throws Exception{
    Comput tpo = new Comput();
    tpo.run();
    }
    }
      

  4.   

    eidolon_warrior(精灵_战士),
    你的那个程序好像有点问题,好像每次只会把每次输入的第一个数字转化为B,具体原因不明:)我也是个初学者,所以试着编译了一下
      

  5.   

    char lower;
          char upper;
          int index = 1; /* 1-26 */      lower = Character.forDigit(index + 9, Character.MAX_RADIX);
          upper = Character.toUpperCase(lower);
          System.out.println(upper);
      

  6.   

    自己写方法来吧。^_^。public  String numbertoAlpha(int[] j)
    {     
         String str = "";
          for(int i=1;i<27;i++)
         {
               str=str+(char)(i+64);
          }
       return str;
    }