阅读下面程序 public class ExampleStringBuffer { public static void main(String[] args) { StringBuffer sb=new Stri

admin2012-03-21  36

问题 阅读下面程序    public class ExampleStringBuffer {        public static void main(String[] args) {            StringBuffer sb=new StringBuffer("test");            System.out.println("buffer="+sb);            System.out.println("length="+sb.length());        }    }    程序运行结果中,在“length=”后输出的值是   

选项 A、10
B、4
C、20
D、30

答案B

解析
转载请注明原文地址:https://kaotiyun.com/show/762p777K
0

最新回复(0)