String[] elements = { “for”, “tea”, “too” }; String first = (elements.length > 0)? elements[0] null; What is the result?()
第1题:
A.String regex="";
B.String regex=" .";
C.String regex=".*";
D.String regex="\\s";
E.String regex="\\.\\s*";
F.String regex="\\w[\.]+";
第2题:
Given:Andthefollowingfivefragments:publicstaticvoidmain(String...a){publicstaticvoidmain(String.*a){publicstaticvoidmain(String...a){publicstaticvoidmain(String[]...a){publicstaticvoidmain(String...[]a){Howmanyofthecodefragments,insertedindependentlyatline2,compile?()
A.0
B.1
C.2
D.3
E.4
第3题:
A.Compilation fails.
B.An exception is thrown at runtime.
C.The variable first is set to null.
D.The variable first is set to elements[0].
第4题:
Which expressions will evaluate to true if preceded by the following code?() String a = "hello"; String b = new String(a); String c = a; char[] d = { ’h’, ’e’, ’l’, ’l’, ’o’ };
第5题:
下面的哪些程序片断可能导致错误()
第6题:
A.Compilationfails.
B.Anexceptionisthrownatruntime.
C.Thevariablefirstissettonull.
D.Thevariablefirstissettoelements[0].
第7题:
下面哪个方法设置MIME类型?()
第8题:
A.Compilationfails.
B.Anexceptionisthrownatruntime.
C.Thevariablefirstissettonull.
D.Thevariablefirstissettoelements[0].
第9题:
Which statement is true for the class java.util.HashSet? ()
第10题:
Which declarations will allow a class to be started as a standalone program?()