网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

String[] elements = { “for”, “tea”, “too” };  String first = (elements.length > 0)? elements[0] null;  What is the result?()

  • 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].

参考答案

更多 “ String[] elements = { “for”, “tea”, “too” };  String first = (elements.length  0)? elements[0] null;  What is the result?()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].” 相关考题
考题 String[] elements={for,tea,too};String first=(elements.length0)?elements[0]null;What is the result?() 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].

考题 String[]elements={for”,tea”,too”};Stringfirst=(elements.length0)?elements[0]null;Whatistheresult?() A.Compilationfails.B.Anexceptionisthrownatruntime.C.Thevariablefirstissettonull.D.Thevariablefirstissettoelements[0].

考题 Given:Which regular expression, inserted at line 12, correctly splits test into Test A, Test B, and Test C?() A.String regex=;B.String regex= .;C.String regex=.*;D.String regex=\\s;E.String regex=\\.\\s*;F.String regex=\\w[\.]+;

考题 Given:String[]elements={for,tea,too};Stringfirst=(elements.length0)?elements[0]:null;Whatistheresult?() A.Compilationfails.B.Anexceptionisthrownatruntime.C.Thevariablefirstissettonull.D.Thevariablefirstissettoelements[0].

考题 Given:Andthefollowingfivefragments:publicstaticvoidmain(String...a){publicstaticvoidmain(String.*a){publicstaticvoidmain(String...a){publicstaticvoidmain(String[]...a){publicstaticvoidmain(String...[]a){Howmanyofthecodefragments,insertedindependentlyatline2,compile?()A.0B.1C.2D.3E.4

考题 下面哪个方法设置MIME类型?()A、setHeader(String headerName,String headerValue)B、setContentType(String mimeType)C、setContentLength(int length)D、addCookie(Cookie c)E、addHeader(String name,String value)

考题 下面的哪些程序片断可能导致错误() A、String s = "Gone with the wind";  String t = " good ";  String k = s + t;B、String s = "Gone with the wind";  String t;  t = s[3] + "one";C、String s = "Gone with the wind";  String standard = s.toUpperCase();D、String s = "home directory"; String t = s - "directory"

考题 Which statement is true for the class java.util.HashSet? () A、 The elements in the collection are ordered.B、 The collection is guaranteed to be immutable.C、 The elements in the collection are guaranteed to be unique.D、 The elements in the collection are accessed using a unique key.E、 The elements in the collections are guaranteed to be synchronized.

考题 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’ };  A、(a == "Hello")B、(a == b)C、(a == c)D、a.equals(b)E、a.equals(d)

考题 Which declarations will allow a class to be started as a standalone program?()  A、public void main(String args[])B、public void static main(String args[])C、public static main(String[] argv)D、final public static void main(String [] array)E、public static void main(String args[])

考题 下面哪些语句能够正确地生成5个空字符串?()A、String a[]=new String[5];for(int i=0;i5;a[i++]=“”);B、String a[]={“”,“”,“”,“”,“”};C、String a[5];D、String[5]a;E、String[]a=new String[5];for(int i=0;i5;a[i++]=null);

考题 Which of the following fragments might cause errors?()    A、 String s = "Gone with the wind";String t = " good ";String k = s + t;B、 String s = "Gone with the wind";String t;t = s[3] + "one";C、 String s = "Gone with the wind";String standard = s.toUpperCase();D、 String s = "home directory";String t = s - "directory";

考题 11. String test = “Test A. Test B. Test C.”;  12. // insert code here  13. String[] result = test.split(regex);  Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?()A、 String regex = “”;B、 String regex = “ “;C、 String regex = “.*“.D、 String regex = “//s”E、 String regex = “//.//s*”;F、 String regex = “//w[ /.] +“;

考题 Given: 11.String test = "Test A. Test B. Test C."; 12.// insert code here 13.String[] result = test.split(regex); Which regular expression, inserted at line 12,correctly splits test into "Test A","Test B",and "Test C"?()A、String regex = "";B、String regex = " ";C、String regex = ".*";D、String regex = "//s";E、String regex = "//.//s*";

考题 单选题You create a Web Form with several UI elements on it. During a code review, you realize that some of the UI elements can be grouped into user controls. You need to create a Web control to group the UI elements that do not require server-side processing. Doing so will enable you to programmatically add or remove the UI elements from the page. You want to maintain the UI elements' style properties. What should you do? ()A Use System.Web.UI.TemplateControl to group the UI elements.B Use System.Web.UI.HtmlControls.HtmlControl to group the UI elements.C Use System.Web.UI.LiteralControl to group the UI elements.D Use System.Web.UI.WebControls.Literal to group the UI elements.

考题 单选题BO模板在Design模式下,可以编辑的内容有()A Only Report Elements and FormattingB Page Setup、Data Access、Report Elements Analysis and FormattingC Only Formatting、Data Access and AnalysisD Only Data Access、Report Elements and Formatting

考题 单选题String[] elements={"for","tea","too"}; String first=(elements.length0)?elements[0]null; What is the result?()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].

考题 单选题Why can’t we divide film into various elements for analysis?A Because these elements are interwoven with each other and cannot be separated without failing to appreciate a film as a whole.B Because films cannot be written down and it is inconvenient to analyze themC Because films elements are too complicated.D Because films need not to be analyzed in detail.

考题 单选题1. import java.util.*;  2. public class TestSet {  3. enum Example { ONE, TWO, THREE }  4. public static void main(String[] args) {  5. Collection coll = new ArrayList();  6. coll.add(Example.THREE);  7. coll.add(Example.THREE);  8. coll.add(Example.THREE);  9. coll.add(Example.TWO);  10. coll.add(Example.TWO);  11. coll.add(Example.ONE);  12. Set set = new HashSet(coll);  13. }  14. }  Which statement is true about the set variable on line 12?()A  The set variable contains all six elements from the coll collection, and the order is guaranteed to be preserved.B  The set variable contains only three elements from the coll collection, and the order is guaranteed to be preserved.C  The set variable contains all six elements from the coil collection, but the order is NOT guaranteed to be preserved.D  The set variable contains only three elements from the coil collection, but the order is NOT guaranteed to be preserved.

考题 单选题You need to design the storage of the application texts for UI elements to fulfill the requirements. Which table and column design should you use?()A Languages (LanguageID, Name)Elements (ElementID, Description)ElementLanguages (ElementID, LanguageID, Text) B Languages (LanguageID, Name)Elements (ElementID, LanguageID, Description, Text) C Languages (LanguageID, Name)ElementTexts (LanguageID, Text)ElementDescriptions (ElementID, Description) D Languages (LanguageID, Name)Elements (ElementID, Description, Text)

考题 单选题Which statement is true for the class java.util.ArrayList?()A  The elements in the collection are ordered.B  The collection is guaranteed to be immutable.C  The elements in the collection are guaranteed to be unique.D  The elements in the collection are accessed using a unique key.E  The elements in the collections are guaranteed to be synchronized.

考题 单选题Given: String[] elements = { "for", "tea", "too" }; String first = (elements.length  0) ? elements[0] : null; What is the result?()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].

考题 单选题Which HttpSession method stores an object in a session?()A  put(String name. Object value)B  set(String name. Object value)C  setAttribute(String name. Object value)D  putAttribute(String name. Object value)E  addAttribute(String name. Object value)

考题 单选题11. String test = “Test A. Test B. Test C.”;  12. // insert code here  13. String[] result = test.split(regex);  Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?()A  String regex = “”;B  String regex = “ “;C  String regex = “.*“.D  String regex = “//s”E  String regex = “//.//s*”;F  String regex = “//w[ /.] +“;

考题 单选题lisa is writing a formula to determine the number of elements in a list. she wants to ensure that a value is returned, even if the value her function is evaluating turns out to be a null string . which one of the following can she so to accomplish this ?()A use a defaule formula of 1 B use @elements and add 1 to the total C use the @count function instead of @elements D use @texttotime to ensure that all strings arte converted to date-time values 

考题 单选题The anthropologists would have considered their research a success if they would have found a language that shares lexical elements with the Borneans they were studying.A if they would have found a language that shares lexical elements with the Borneans they were studyingB had they found a language that shares lexical elements with that of the Borneans they were studyingC if they found a language that shares lexical elements with the Borneans they were studyingD if they had found a language that shares lexical elements with the Borneans they were studyingE if they would have found a language that shares lexical elements with that of the Borneans they were studying

考题 单选题Given: Which regular expression, inserted at line 12, correctly splits test into "Test A", "Test B", and "Test C"?()A String regex="";B String regex=" .";C String regex=".*";D String regex="//s";E String regex="//.//s*";F String regex="//w[/.]+";