声明对象
声明类别
鉴别对象的类型
第1题:
考虑如下代码:
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" );
else
System.out.println( "Oops" );
}
}
则输出结果中有哪些?
A.Pine B.Tree C.Forest D.Oops E.无输出
第2题:
简述static关键字的作用
第3题:
第4题:
instanceof关键字的作用()
第5题:
如果有两个排序关键字,则它们的关系是()。
第6题:
A.ItenablesaPVST+instanceof10forvlan11andvlan12
B.Itenablesvlan11andvlan12tobepartoftheMSTregion10
C.Itmapsvlan11andvlan12totheMSTinstanceof10.
D.ItcreatesanInternalSpanningTree(IST)instanceof10forvlan11andvlan12
E.ItcreateaCommonSpanningTree(CST)instanceof10forvlan11andvlan12
F.ItstartstwoinstancesofMST,oneinstanceforvlan11andanotherinstanceforvlan12.
第7题:
什么是“排序”功能?“主要关键字、“次要关键字”和“第三关键字”在排序中起什么作用?
第8题:
下列关于C++关键字的说法中正确的是
A.关键字是用户为程序中各种需要命名的“元素”所起的名字
B.关键字是对程序中的数据进行操作的一类单词
C.关键字是在程序中起分割内容和界定范围作用的一类单词
D.关键字是C++中预先定义并实现一定功能的一类单词
第9题:
关键字volatile有什么作用?
第10题:
简述多关键字文件的作用。