摘要:
第一种方式: public class Demo { public static void main(String[] args) { String sb=new String("sada111sdadasds"); int count=0; for (int i = 0; i <sb.length 阅读全文
摘要:
两段代码演示: public class Demo4 { public static void main(String[] args) { System.out.println(new Demo4().test()); } int test(){ int x=1; try { return x; } 阅读全文
摘要:
1.String是最基本的数据类型吗? 答:不是,最基本的数据类型有:byte short int long float double char boolean java.lang.String类时final修饰的类,因此不可以继承这个类,也不能修改这个类,为了节省内存空间,我们通常使用String 阅读全文