下面使用List的构造函数正确的是()
A.Listl=newList()
B.Listl=newList("List")
C.Listl=newList(10)
D.Listl=newList(10,true)
A.Listl=newList()
B.Listl=newList("List")
C.Listl=newList(10)
D.Listl=newList(10,true)
第1题
A.TextAreat=newTextArea()
B.TextAreat=newTextArea("TextArea")
C.TextAreat=newTextArea(10)
D.TextAreat=newTextArea("TextArea",10)
第2题
A.MenuItemm=newMenuItem()
B.MenuItemc=newMenuItem("MenuItem")
C.MenuItemc=newMenuItem("MenuItem",newenuShortcut(KeyEvent.VK_S))
D.MenuItemc=newMenuItem(newenuShortcut(KeyEvent.VK_S),"MenuItem")
第3题
A.Choicec=newChoice()
B.Choicec=newChoice("Choice")
C.Choicec=newChoice("Choice",true)
D.Choicec=newChoice(true,"Choice")
第4题
A.Menum=newMenu()
B.Menum=newMenu("Menu")
C.Menum=newMenu("Menu",true)
D.Menum=newMenu(true,"Menu")
第5题
A.Dialogd=newDialog()
B.Dialogd=newDialog(f)
C.Dialogd=newDialog(f,"hello")
D.Dialogd=newDialog(f,true)
第6题
A.在类中声明构造函数时,名称须与类名相同
B.具有重载特性,可以建立多个相同名称
C.使用类建立新对象时,会自动执行构造函数,因此在构造函数内设定变量的初始值进行内存的分配
D.以上都是
第7题
A.void a(int x){...}
B.void A(int x){...}
C.a(int x){...}
D.A(int x){...}
第9题
填空并回答相关问题。 (1)下面是将任意序列调整为最大堆(MAXHEAP)的算法,请将空白部分填上。将任意序列调整为最大堆通过不断调用adjust函数,即 for(i=n/2;i>0;i一一)adjust(1ist,i,n); 其中list为待调整序列所在数组(从下标1开始),n为序列元素个数,adjust函数为: void adjust(int 1ist[],int root,int n) /*将以root为下标的对应元素作为待调整堆的根,待调整元素放在list数组中,最大元素下标为n*/ {i
第10题
A.多承中,多个基类必须采用相同的继承方式
B.多继承中,多个基类可以采用不同的继承方式
C.多继承中创建派生类对象时会先调用派生类构造函数,再调用各基类构造函数
D.多继承中创建派生类对象时各基类构造函数的调用顺序与基类的继承顺序一致