What is the result?()
A.three B.other C.An exception is thrown at runtime. D.Compilation fails because of an error on line 12. E.Compilation fails because of an error on line 13. F.Compilation fails because of an error on line 15.
单项选择题What is the result?()
A.The value "4" is printed at the command line. B.Compilation fails because of an error in line 5. C.Compilation fails because of an error in line 9. D.A NullPointerException occurs at runtime. E.A NumberFormatException occurs at runtime. F.An IllegalStateException occurs at runtime.
单项选择题Which code fragment, inserted at line 24, outputs 123abc 123abc ?()
A.sb1.append("abc"); s1.append("abc"); B.sb1.append("abc"); s1.concat("abc"); C.sb1.concat("abc"); s1.append("abc"); D.sb1.concat("abc"); s1.concat("abc"); E.sb1.append("abc"); s1=s1.concat("abc"); F.sb1.concat("abc"); s1=s1.concat("abc");
单项选择题Which code, inserted at line 14, sets the value of b to 314.159,26?()
A.b=nf.parse(input); B.b=nf.format(input); C.b=nf.equals(input); D.b=nf.parseObject(input);
单项选择题Given a vaid DateFormat object named df, and What updates d’s value with the date represented by ds?()
A.18.d=df.parse(ds); B.18.d=df.getDate(ds); C.18.try{19.d=df.parse(ds);20. }catch(ParseException e){ } D.18.try{19.d=df.getDate(ds);20. }catch(ParseException e){ }
多项选择题Giventhatcisareferencetoavalidjava.io.Consoleobject,whichtwocodefragmentsreadalineoftextfromtheconsole?()
A.String s = c.readLine(); B.char[ ] c = c.readLine(); C.String s = c.readConsole(); D.char[ ] c = c.readConsole(); E.String s = c.readLine("%s", "name "); F.char[ ] c = c.readLine("%s", "name ");