《Java程序设计》理论题库—选择题(单项选择175题)1
欲构造ArrayList类的一种实例,此类继承了List接口,下列哪个措施是对的的
BA、ArrayListmyList=newObject();B、ListmyList=newArrayList();C、ArrayListmyList=newList();D、ListmyList=newList();2
paint()措施使用哪种类型的参数
AA、GraphicsB、Graphics2DC、StringD、Color3
指出对的的体现式DA、byte=128;//byte取值到127B、Boolean=null;C、longl=0xfffL;D、double=0
9239d;4
指出下列程序运行的成果BpublicclassExample{Stringstr=newString("good");char[]ch={'a','b','c'};publicstaticvoidmain(Stringargs[]){Exampleex=newExample();ex
change(ex
str,ex
ch);System
print(ex
str+"and");Sytem
print(ex
ch);}publicvoidchange(Stringstr,charch[]){str="testok";ch[0]='g';}}A、goodandabcB、goodandgbcC、testokandabcD、testokandgbc5
运行下列程序,会产生什么成果CDpublicclassXextendsThreadimplementsRunable{publicvoidrun(){System
println("thisis