平安科技笔试题 1 一 单项选择题1
下面代码输出什么
public class A { static{ System
print("A"); } A(){ System
print("a"); } } public class B extends A { static{ System
print("B"); } B(){ System
print("b"); } } public class Test { public static void main(String[] args) { new B(); } } a) AaBb b) ABab c) BAba d) BbAa e) Aa f) Bb 2
子类继承父类,正确的是a) 子类能够继承父类的私有方法和私有状态b) 子类能够继承父类的protected方法,但不能继承父类的 protected状态c) 子类能够继承父类的protected方法,也能够继承父类的 protected状态d) 子类能够继承父类的非私有方法和非私有状态3
下面代码输出什么
int i = 9; switch(i){ case 1: System
print(""); default: System
print("Error"); case 2: System
print("Good"); case 3: System
print("Best"); } a) 空字符串b) Error c) ErrorGood d) ErrorGoodBest 4
对 jsp 编译的描述正确的是
a) 自动编译b) 用户输入命令后,自动编译c) 手动编译d) 不需要编译5
对接口的描述正确的是:a) 一个类可以实现多个接口
b) 接口可以有非静态的成员变量
c) 接口可以实作方法