字符数组转化为字符串用什么函数呢?
我用toString试了一下,虽然能运行但是结果是错误的.高手帮帮忙....多谢多谢!

解决方案 »

  1.   

    e...可能,大概没有的吧我也不是太清楚,但Character类中绝对没有这样的方法,Character.toString( char c  )方法将一个字符转换成String,但并没有提供将一系列字符转换成一个String的方法。@.@||~
      

  2.   

    要自己写啦
    用这个:String(char[] value) 
              Allocates a new String so that it represents the sequence of characters currently contained in the character array argument.比如:
          char []ch = {'S','t','r','i','n','g'};
    String str1 = new String(ch);
    System.out.println(str1.toString());
    自己加工下就ok啦
      

  3.   

    哇赛, 007remember(绿原) ,高人来着,严重感谢并仰慕你!!!
      

  4.   

    String(char[] value) 
    String(char[] value, int offset, int count) 
    两个实用的函数哦!
      

  5.   

    看一下api 要知道String的构造函数的argument是什么都,不就可以了吗。
    api里自由黄金屋,具体怎么写,看上面高手写的就好咯
      

  6.   

    找找 apache jakarta common 下面的基础组件 可能找到 直接调用的
      

  7.   

    String.valueOf(char [])static String valueOf(char[] data) 
    Returns the string representation of the char array argument.