题目内容

考虑以下类:class Parent{String one, two;public Parent (String a, String b){one = a;two = b;}public void print( ){ System.out.println(one); }}public class Child extends Parent {public Child(String a, String b){super(a, b);}public void print( ){System.out.println(one + " to " + two );}public static void main(String[ ] args){Parent p = new Parent("south", "north");Parent t = new Child("east", "west");p.print( );t.print( );}}程序调试结果为()。

A. 在编译时出错
B. southeast
C. south to northeast to west
D. south to northeast
E. southeast to west

查看答案
更多问题

设有以下代码:class Base{ }public class MyCast extends Base{static boolean b1 = false;static int i = -1;static double d = 10.1;public static void main(String[] args){MyCast m = new MyCast( );Base b = new Base( );//Here}}则在 //Here处插入()代码将不出现编译和运行错误。

A. b = m;
B. m = b;
C. d = i;
D. b1 = i;

写出程序的运行结果:class Tree{ }class Pine extends Tree{ }class Oak extends Tree{ }public class Forest {public static void main(String[ ] args){Tree tree = new Pine( );if( tree instanceof Pine)System.out.println("Pine");if( tree instanceof Tree)System.out.println("Tree");if( tree instanceof Oak)System.out.println("Oak");elseSystem.out.println("Oops");}}

吉赛利的领导品质理论提出了八种个性特征和五种激励特征,最重要的特征是()

A. 监督能力
B. 职业成就
C. 智力
D. 自信

以下关于日本学者三隅二不二提出的PM理论,说法错误的是()

A. 任何一个团队都需要两种机能:目标达成机能和维持强化机能
B. P机能主要包括计划性和压力等因素
C. M机能主要是对下属进行关怀体贴
D. Mp型(机能维持型)比Pm(执行任务型)工作效率更高。

答案查题题库