更多java基础知识试题
- 1接口Statement中定义的execute方法的返回类型所代表的含义是:( )
- 2在代码中使用关键字()来与对象的互斥锁联系。当某个对象使用该修饰时,表明该对象在任一时刻只能由一个线程访问。
- 316.设有下面两个类的定义:class Person { long id; // 身份证号String name; // 姓名 }class Student extends Person { int score; // 入学总分 int getScore(){return score; }}则类Person和类Student的关系是( )。
- 4下述代码的执行结果是class Super { public int getLength() { return 4; }}public class Sub extends Super { public long getLength() { return 5; } public static void main (String[]args) { Super sooper = new Super (); Super sub = new Sub(); System.out.printIn(sooper.getLength()+ “,” + sub.getLength() ); }}
- 5在java中下列关于自动类型转换说法正确的是