为什么不能new char('a')
xxrei 2004-09-03 12:03:07 //第四章:第4题
import java.util.*;
class DefaultTest{
DefaultTest(Object[][] x){
for ( int i = 0 ; i < x.length ; i++ ){
for ( int j = 0 ; j < x[i].length ; j++ ){
prn("x[" + i + "][" + j + "] = " + x[i][j]);
}
}
}
static void prn(String s){
System.out.println(s);
}
}
class Test{
public static void main(String args[]){
DefaultTest t3 = new DefaultTest(new Object[][]{
{new Integer(20),new String("mmgg"),new Double(3.15)},
{new Long(20),new String("ttss"),new char('a')}, });
}
}
为什么不能new char('a')