文档介绍:2020年度Java-笔试题(1)答案班级:_______________学号:______________姓名:___________Java笔试题(可多选)(ABD)Astart()   Brun()   Cexit()   DgetPriority() 2.(A)A继承自Throwable   BSerialable   C该类实现了Throwable接口D该类是一个公共类 (false)Stringstr1="hello";Stringstr2="he"+newString("llo");(str1==str2); 4. 下列说法正确的有(C), >,<,>=,<=,==运算?(true):(B)publicstaticvoidmain(Stringargs[]){Threadt=newThread(){publicvoidrun(){pong();}};();("ping");}staticvoidpong(){("pong");}Apingpong    Bpongping   Cpingpong和pongping都有可能   D都不输出 (AB)  BMySql  CIMS  DMongoDB (垃圾回收器)线程是否为守护线程?(true) ?(false)(AC)ALinkedList继承自ListBAbstractSet继承自SetCHashSet继承自AbstractSetDWeakMap继承自HashMap +1<i的数吗?(存在) 12.(B)Afloat  Bdouble  CFloat   DDouble (A )A  BufferedWriter B  FileInputStream  C  ObjectInputStream  DInputStreamReader (CD)Aprivate  Bprotected   Cfinal   Dabstract (A)A是  B否 =newArrayList(20);中的list扩充几次(A)A0  B1  C2   D3 (AB)ADES BAES CDSA DRSA ,下面哪个选项的代码是错误的?(B)A)newBufferedWriter(newFileWriter(""));B)newBufferedReader(newFileInputStream(""));C)newGZIPOutputStream(newFileOutputStream(""));D)newObjectInputStream(newFileInputStream("")); (yes)lassNULL{publicstaticvoidhaha(){("haha");}publicstaticvoidmain(String[]args){((NULL)null).haha();}}()classHelloA{publicHelloA(){("HelloA");}{("I'mAclass");}static{("staticA");}}lassHelloBextendsHelloA{publicHelloB(){("HelloB");}{("I'mBclass");}static{("staticB");}publicstaticvoidmain(String[]args){ newHelloB(); }}StaticAStaticBHelloAI’mAclassHelpBI’mBClass21. getCustomerInfo()方法如下,try中能够捕获三种类型的异常,如果在该方法运行中产生了一个IOException,将会输出什么结果(A)publicvoidgetCustomerInfo(){try{//dosomethingthatmaycauseanException}catch(ex){("FileNotFoundException!");}catch(ex){("IOException!")