String s = c.readLine();
char[] c = c.readLine();
String s = c.readConsole();
char[] c = c.readConsole();
String s = c.readLine(%s, name );
第1题:
Given: 3.public class MyTagHandler extends TagSupport { 4.public int doStartTag() { 5.// insert code here 6.// return an int 7.} 8.// more code here ... 18.} There is a single attribute foo in the session scope. Which three code fragments,inserted independently atline 5,return the value of the attribute?()
第2题:
Given that c is a reference to a valid java.io.Console object, which two code fragments read a line of text from the console?()
第3题:
A.Strings=c.readLine();
B.char[]c=c.readLine();
C.Strings=c.readConsole();
D.char[]c=c.readConsole();
E.Strings=c.readLine("%s","name");
F.char[]c=c.readLine("%s","name");
第4题:
Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()
第5题:
Given that file is a reference to a File object that represents a directory, which code fragments will succeed in obtaining a list of the entries in the directory?()
第6题:
public class TestString3 { public static void main(String[] args) { // insert code here System.out.println(s); } } Which two code fragments, inserted independently at line 3, generate the output 4247?()
第7题:
Given the following code fragment: public void create() { Vector myVect; myVect = new Vector(); } Which of the following statements are true?()
第8题:
A.public int compareTo(Object o){/*more code here*/}
B.public int compareTo(Score other){/*more code here*/}
C.public int compare(Score s1,Score s2){/*more code here*/}
D.public int compare(Object o1,Object o2){/*more code here*/}
第9题:
Given that c is a reference to a valid java.io.Console object, and: 11.String pw = c.readPassword("%s", "pw: "); 12.System.out.println("got " + pw); 13.String name = c.readLine("%s", "name: "); 14.System.out.println(" got ", name); If the user types fido when prompted for a password, and then responds bob when prompted for a name,what is the result?()
第10题:
You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code.