单选题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 fi

题目
单选题
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?()
A

An exception is thrown at runtime

B

pw: fido got fido name: bob got bob

C

pw: got fido name: bob got bob

D

Compilation fails.


相似考题
更多“单选题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 fi”相关问题
  • 第1题:

    Helen’s husband is Mark. Mark and Helen have got two children: a son and a daughter. The son’s name is Andrew and the daughter’s name is Joyce. Joyce has got two children, a son and a daughter. So Helen and Mark have got two grandchildren. Helen’s granddaughter’s name is Pam and her grandson’s name is Dan. Andrew isn’t married and he hasn’t got any children. Pam and Dan like playing on the computer with their uncle. Andrew also likes playing football with his brother-in-law, Tom.

    1.Andrew is Dan’s uncle. ()

    A.Right

    B.Wrong

    2.Mark is Dan’s father. ()

    A.Right

    B.Wrong

    3.Tom is Dan’s grandfather. ()

    A.Right

    B.Wrong

    4.Joyce is Tom’s wife. ()

    A.Right

    B.Wrong

    5.Pam is Andrew’s niece. ()

    A.Right

    B.Wrong


    正确答案:1.A2.B3.B4.A5.A

  • 第2题:

    Your Web site uses custom Themes. Your Web site must support additional Themes based on the user‘s company name. The company name is set when a user logs on to the Web site. The company‘s Theme name is stored in a variable named ThemeName. You need to use this variable to dynamically set the Web site‘s Theme.What should you do?()

    A.

    B.

    C.

    D.


    参考答案:C

  • 第3题:

    Giventhatcisareferencetoavalidjava.io.Consoleobject,and:11.Stringpw=c.readPassword("%s","pw:");12.System.out.println("got"+pw);13.Stringname=c.readLine("%s","name:");14.System.out.println("got",name);Iftheusertypesfidowhenpromptedforapassword,andthenrespondsbobwhenpromptedforaname,whatistheresult?()

    A.Anexceptionisthrownatruntime

    B.pw:fidogotfidoname:bobgotbob

    C.pw:gotfidoname:bobgotbob

    D.Compilationfails.


    参考答案:D

  • 第4题:

    有以下定义和语句: struct students {int num;char name[20];char c; struct {int grade1;int grade2;}s; }; struct students w,*pw; *pw=w; 下列赋值语句不正确的是( )。

    A.w.num=1002;

    B.w.grade1=85;

    C.pw->num=1002;

    D.w.s.grade2=85;


    正确答案:B

  • 第5题:

    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?()

    • 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 ");

    正确答案:A,E

  • 第6题:

    创建以太业务PW时,PW类型为以太,以下参数取值会影响业务的是()

    • A、业务分界标签取值“user”,PW两边VLAN设置不一致
    • B、业务分界标签取值“server”,PW两边VLAN设置不一致
    • C、业务分界标签取值“user”,PW两边VLAN设置一致
    • D、单机光功率测试
    • E、业务分界标签取值“server”,PW两边VLAN设置一致

    正确答案:A

  • 第7题:

    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)

    正确答案:C

  • 第8题:

    Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()

    • 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 ");

    正确答案:A,E

  • 第9题:

    单选题
    Given a web application in which the cookie userName is expected to contain the name of the user. Which EL expression evaluates to that user name?()
    A

    ${userName}

    B

    ${cookie.userName}

    C

    ${cookie.user.name}

    D

    ${cookies.userName[0]}


    正确答案: A
    解析: 暂无解析

  • 第10题:

    单选题
    Bob, a technician, needs to backup a user’s local My Documents on a Windows XP workstation.Which of the following is the QUICKEST way to the user’s folder?()
    A

    Browse to the root, Documents and Settings, user’s name, and then My Documents

    B

    Browse to the root, Users, Documents and Settings, user’s name, and then My Documents

    C

    Type %system% into the run box

    D

    Type %temp% into the run box, My Documents, and then user’s name


    正确答案: A
    解析: 暂无解析

  • 第11题:

    单选题
    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?()
    A

    An exception is thrown at runtime

    B

    pw: fido got fido name: bob got bob

    C

    pw: got fido name: bob got bob

    D

    Compilation fails.


    正确答案: D
    解析: 暂无解析

  • 第12题:

    多选题
    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?()
    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 );


    正确答案: B,D
    解析: 暂无解析

  • 第13题:

    Tarzan’s name is given by the gorilla mother.()


    参考答案:正确

  • 第14题:

    Giventhatcisareferencetoavalidjava.io.Consoleobject,whichtwocodefragmentsreadalineoftextfromtheconsole?()

    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");


    参考答案:A, E

  • 第15题:

    下面哪些句子可以表示"您贵姓?"()

    A、What's your last name?

    B、What's your family name?

    C、What's your name?

    D、What's your first name?


    参考答案:AB

  • 第16题:

    ( 38 )有以下定义和语句

    struct workers

    { int num;char name[20];char c;

    struct

    { int day; int month; int year; } s;

    } ;

    struct workers w,*pw;

    pw = &w;

    能给 w 中 year 成员赋 1980 的语句是

    A ) *pw.year = 198O;

    B ) w.year=1980;

    C ) pw->year=1980;

    D ) w.s.year=1980;


    正确答案:D

  • 第17题:

    Given a web application in which the cookie userName is expected to contain the name of the user. Which EL expression evaluates to that user name?()

    • A、${userName}
    • B、${cookie.userName}
    • C、${cookie.user.name}
    • D、${cookies.userName[0]}

    正确答案:B

  • 第18题:

    Bob, a technician, needs to backup a user’s local My Documents on a Windows XP workstation.Which of the following is the QUICKEST way to the user’s folder?()

    • A、Browse to the root, Documents and Settings, user’s name, and then My Documents
    • B、Browse to the root, Users, Documents and Settings, user’s name, and then My Documents
    • C、Type %system% into the run box
    • D、Type %temp% into the run box, My Documents, and then user’s name

    正确答案:A

  • 第19题:

    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?()

    • A、An exception is thrown at runtime
    • B、pw: fido got fido name: bob got bob
    • C、pw: got fido name: bob got bob
    • D、Compilation fails.

    正确答案:D

  • 第20题:

    “您想要出租车吗?”的英文表述是()。

    • A、How can I got here?
    • B、Where are you from?
    • C、Do you want a taxi?
    • D、What's your name?

    正确答案:C

  • 第21题:

    单选题
    有以下定义和语句: struct workers {  int num;  char name[20];  char c;  struct  {   int day;   int month;   int year;  }s; }; struct workers w,*pw; pw=&w; 能给w中year成员赋1980的语句是(  )。
    A

    *pw.year=1980;

    B

    w.year=1980;

    C

    pw->year=1980;

    D

    w.s.year=1980;


    正确答案: B
    解析:
    w是一个结构体变量,pw是一个结构体指针变量,指向w所在的内存单元。A项错误,pw是指针,所以在引用其内部变量时应该用操作符“->”而不是“.”。BC两项错误,year是结构体workers中的结构体成员s中的成员。答案选择D选项。

  • 第22题:

    单选题
    创建以太业务PW时,PW类型为以太,以下参数取值会影响业务的是()
    A

    业务分界标签取值“user”,PW两边VLAN设置不一致

    B

    业务分界标签取值“server”,PW两边VLAN设置不一致

    C

    业务分界标签取值“user”,PW两边VLAN设置一致

    D

    单机光功率测试

    E

    业务分界标签取值“server”,PW两边VLAN设置一致


    正确答案: E
    解析: 暂无解析

  • 第23题:

    单选题
    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)


    正确答案: A
    解析: 暂无解析

  • 第24题:

    多选题
    Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()
    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 );


    正确答案: B,D
    解析: 暂无解析