昆明餐饮网站建设,小型行业网站建设维护成本,软文推广平台有哪些,做论坛app网站1.基本数据类型以及对应包装类 Byte Short Integer Long Float Double Boolean Character 2.什么是自动拆箱和装箱#xff0c;jdk版本有什么要求#xff1f;代码举 例并标明 Integer a 100; // 装箱 int b a; // 拆箱 从JDK1.5才开始支持 3.NumberFormatException是什么异常…1.基本数据类型以及对应包装类 Byte Short Integer Long Float Double Boolean Character 2.什么是自动拆箱和装箱jdk版本有什么要求代码举 例并标明 Integer a 100; // 装箱 int b a; // 拆箱 从JDK1.5才开始支持 3.NumberFormatException是什么异常代码说明会导致 这种异常的情况 数字格式化异常 Integer i new Integer(abc); 4.Math类获取随机数的方式向上取整向下四舍五入 Math.random() Math.ceil() Math.floor() Math.round() 5.Random类获取随机数的方式 nextInt() nextInt(int bounds) nextFloat() nextDouble() nextLong() nextBoolean() 6.静态常量的写法 static final 7.this和super的区别 this表示当前对象 super表示当前对象中父类的信息 8.写出你知道的String类常用方法 length() equals() toString() equalsIgnoreCase() toLowerCase() toUpperCase() concat() indexOf() lastIndexOf() trim() substring() split() startsWith() endsWith() contains() isEmpty() replace() charAt() toCharArray()
format 9.面向对象的特征是什么详细描述 封装属性私有 方法公开 降低程序的耦合度 提高代码的重用性 继承子类继承父类 父类中书写共有的信息 子类中书写独有的信息 子类与父类是is-a 的关系 多态父类引用指向子类对象 同一个引用类型 指向不同的实例类型