首页 > 试题广场 >

请说出E类中标注的【代码1】和【代码2】的输出结果。 pu

[问答题]
请说出E类中标注的【代码1】和【代码2】的输出结果。
public class E{
    public static void main(String[] args[]){
   byte d[]="abc我们喜欢篮球".getBytes();
     System.out.printld(d.length);   //【代码1】
     String s=new String(d,0,7);
     System.out.println(s);  //【代码2】
    }
}

这道题你会答吗?花几分钟告诉大家答案吧!