多选题35.String #name="Jane Doe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Which two are true?()ALine 35 will not compile.BLine 36 will not compile.CLine 37 will not compile.DLine 38 will not compile.

题目
多选题
35.String #name="Jane Doe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Which two are true?()
A

Line 35 will not compile.

B

Line 36 will not compile.

C

Line 37 will not compile.

D

Line 38 will not compile.


相似考题
更多“35.String #name="Jane Doe";36.int$age=24;37.Double_height=12”相关问题
  • 第1题:

    学生表(id,name,sex,age,depart_id,depart_name),存在函数依赖是id→name,sex,age,depart_id;dept_id→dept_name,其满足()。

    A、1NF

    B、2NF

    C、3NF

    D、BCNF


    参考答案:B

  • 第2题:

    ( ) name is Jane. ( ) is from the USA.

    A. Her, She

    B. She's, She

    C. Her, Her


    答案:A

  • 第3题:

    向Applet传递参数的正确描述是A.B.

    向Applet传递参数的正确描述是

    A.<param name=age.value=20>

    B.<applet code=Try.class width=100,height=100,age=33>

    C.<name=age.value=20>

    D.<applet code=Try.class name=age,value=20>


    正确答案:A
    解析:Applet获取参数是通过HTML文件中采用PARAM>标记定义参数。Java中还定义了相应的方法,用来从HTML中获取参数。格式为:
      param name=appletParameter1 value=value>

  • 第4题:

    请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl。程序中位于每个“//ERROR****found料****之后的一行语句有错误,请加以改正。改正后程序的输出结果应为: Name:Smith Age:21 ID:99999 CourseNum:12 Record:970 注意:只修改每个“//ERROR****found****”下的那一行,不要改动程序中的其他内容。 include<iostream> using namespace std; class Studentlnfo { protected: //ERROR********************found**************** char Name; int Age; int ID: int CourseNum; float Record; public: Studentlnfo(char*name,int Age,int ID,int coumeNum,float record); //ERROR ********************found******************** void~Studentlnfo{} float AverageRecord{ return Record/CourseNum; } void showconst{ cout<<”Name:”<<Name<<”Age:”<<Age<<”ID:”<<ID <<”CourseNum:”<<CourseNum<<”Record:”<<Record<<endl; } }; //ERROR ******************found************** StudentInfo StudentInfo(char*Name,int Age,int ID,int CourseNum,float Record) { Name=name; Age=age; this一>ID=ID: CourseNum=courseNum: Record=record; } int main { Studentlnfo st(’’Smith”,21,99999,12,970); st.show; return 0; }


    正确答案:

    (1)char*Name;
    (2)~Studentlnfo{}
    (3)Studentlnf0::Studentlnfo(char*name,int age,,int ID,int eourseNum,float record)

  • 第5题:

    Person p = new Person(“张三”,23);这条语句会调用下列哪个构造方法给属性进行初始化()

    A.public Person(){}

    B.public Person(String name,int age) { this.name = name; this.age = age; }

    C.public Person(int age,String name) { this.age = age; this.name = name; }

    D.public Person(String name) { this.name = name; }


    答案:B
    解析:创建对象时会找到匹配的构造方法给属性进行初始化,由于Person p = new Person(“张三”,23);这条语句中有两个参数,而且第1个参数是String类型的,第2个参数是int类型的,因此会调用B选项中的构造方法。

  • 第6题:

    根据下列的定义,能打印出字母P的语句是( )。 struct stu {char name[10]; int age; }; struct sm s[10]={"John",11, "Pau1",12, "Mary",11, "adam",12 };

    A.printf("%c",s[3].name);

    B.printf("%c",s[3].name[1]);

    C.printf("%c",s[2].name[1]);

    D.printf("%c",s[1].name[0]);


    正确答案:D
    解析:本题主要考查按结构数组元素方式引用结构成员。字母P为“Paul”的第一个字母,是结构体s[1]的name成员的第一个元素的值,即s[1].name[0]的值。

  • 第7题:

    数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求写SQL语句查询出表中所有的数据,下列哪个SQL语句是正确的()

    • A、Select* From Student
    • B、Select Name From Student
    • C、Select Name,Age,IDCard From Student
    • D、Select Name,Age,IDCard,Sex From Student

    正确答案:A,D

  • 第8题:

    在Person的一个派生类Employee里调用Person类的构造函数正确方式为()。

    • A、base.Person(name,age)
    • B、base(name,age)
    • C、Person(name,age)
    • D、this(name,age)

    正确答案:B

  • 第9题:

    问答题
    Four years ago, Jane was twice as old as Sam. Four years on from now, Sam will be 3/4 of Jane's age. How old is Jane now?

    正确答案: 12.
    解析:
    设Sam四年前为x,则Jane是2x,x+8=3/4(2x+8),x=4,所以四年前Sam 4岁,Jane 8岁,现在Jane是12岁。

  • 第10题:

    多选题
    Given: 35.String #name = "Jane Doe"; 36.int $age = 24; 37.Double _height = 123.5; 38.double ~temp = 37.5; Which two statements are true?()
    A

    Line 35 will not compile.

    B

    Line 36 will not compile.

    C

    Line 37 will not compile.

    D

    Line 38 will not compile.


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

  • 第11题:

    单选题
    public class Person {  private String name, comment;  private int age;  public Person(String n, int a, String c) {  name = n; age = a; comment = c;  }  public boolean equals(Object o) {  if(! (o instanceof Person)) return false;  Person p = (Person)o;  return age == p.age && name.equals(p.name);  }  }  What is the appropriate definition of the hashCode method in class Person?()
    A

     return super.hashCode();

    B

     return name.hashCode() + age * 7;

    C

     return name.hashCode() + comment.hashCode() /2;

    D

     return name.hashCode() + comment.hashCode() / 2 - age * 3;


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

  • 第12题:

    多选题
    35. String #name = “Jane Doe”;  36. int$age=24;  37. Double_height = 123.5;  38. double~temp = 37.5;  Which two are true?()
    A

    Line 35 will not compile.

    B

    Line 36 will not compile.

    C

    Line 37 will not compile.

    D

    Line 38 will not compile.


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

  • 第13题:

    向Applet传递参数的正确描述是( )。

    A.<param name=age,value=20>

    B.<applet code=Try.class width=100,height=100, age=33>

    C.<name=age,value=20>

    D.<applet code=Try.class name=age,value=20>


    正确答案:A
    A。【解析】<Applet>标记的参数部分一般格式是[<PARAMNAME=appletParameterVALUE-value>]。

  • 第14题:

    String name="Jane Doe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Which two are true?()

    A.Line 35 will not compile.

    B.Line 36 will not compile.

    C.Line 37 will not compile.

    D.Line 38 will not compile.


    参考答案:A, D

  • 第15题:

    给出下面不完整的类代码,则横线处的语句应该为( )。 class Person { String name,department; int age; public Person (Strings) {name=s;} public Person (String s,int

    A.{name=s;age=a;} public Person (String n,String d,intA){ __________ department=d; } }A)Person (n,A);

    B.this (Person(n,A));

    C.this(n,A);

    D.this(name,age);


    正确答案:C
    解析:本题主要考查在同一个类的不同构造方法中调用该类的其他构造方法需要使用 this(…)的形式,而且必须是在构造方法的第一行调用。这个和普通方法重载调用的方式不同,普通方法可以直接使用方法名加参数来调用,而且调用位置没有限制,因此选项A是不行的,选项B的语法就是错误的,选项D的错误在于在父类型的构造方法被调用前不能引用类的成员。构造方法是一个类对象实例化的开始,因此在构造方法中不能将成员作为参数引用。

  • 第16题:

    用SQL写语句:在下列三张表中选出 CLASSID 为“1”的人的NAME和AGE。

    表1 表2 表3

    No Name Age No ID No

    102 Ja 23 102 1 102

    103 Ba 23 104 1 103

    104 Na 24 103 2 104


    正确答案:
     

  • 第17题:

    下列关于结构型变量的定义语句中,错误的是( )

    A.typedef struct CCC

    B.define GGG struct { char name[20];GGG CCC { char name[20]; int age; int age; }GGG; }; GGG abc ; GGG CCC abc;

    C.struct

    D.struct { char name[20]; { char name[20]; int age; int age; }ccc; }abc; CCC abc;


    正确答案:C
    分析备选答案A:利用“typedef”定义了用户自定义的数据类型符“GGG”,这个用户自定义的数据类型符是含有两个成员的结构型CCC,所以语句“GGGabc”是定义结构型CCC的变量abc,语法没有错误。分析备选答案B:利用“#define”定义了宏名“GGG”,这个宏名第一次出现是定义结构型CCC,第二次是定义了结构型CCC的变量allc,所以语法上没有错误。分析备选答案C:这是定义一个没有名称的结构型,同时定义了这种结构型的变量CCC,接着的语句“CCCabc;”显然是错误的,因为CCC是变量名,不是数据类型符,该答案符合题意。至于备选答案D:这是标准的通过定义没有名称的结构型来定义该结构型的变量abc,语法上没有错误。

  • 第18题:

    Given:35.Stringname="JaneDoe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Whichtwostatementsaretrue?()

    A.Line35willnotcompile.

    B.Line36willnotcompile.

    C.Line37willnotcompile.

    D.Line38willnotcompile.


    参考答案:A, D

  • 第19题:

    public class Person {  private String name, comment;  private int age;  public Person(String n, int a, String c) {  name = n; age = a; comment = c;  }  public boolean equals(Object o) {  if(! (o instanceof Person)) return false;  Person p = (Person)o;  return age == p.age && name.equals(p.name);  }  }  What is the appropriate definition of the hashCode method in class Person?() 

    • A、 return super.hashCode();
    • B、 return name.hashCode() + age * 7;
    • C、 return name.hashCode() + comment.hashCode() /2;
    • D、 return name.hashCode() + comment.hashCode() / 2 - age * 3;

    正确答案:B

  • 第20题:

    dataframe对象a有’Name’和’Age’两列,运行a.drop(’Age’,axis=1)后,a中的’Age’列被删除。


    正确答案:错误

  • 第21题:

    多选题
    35.String #name="Jane Doe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Which two are true?()
    A

    Line 35 will not compile.

    B

    Line 36 will not compile.

    C

    Line 37 will not compile.

    D

    Line 38 will not compile.


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

  • 第22题:

    单选题
    Given the following query:SELECT last_name, first_name, age, hire_date FROM employee WHERE age > 40Which of the following clauses must be added to return the rows sorted by AGE, oldest first, and by LAST_NAME, from A to Z?()
    A

    SORT BY age ASC, last_name

    B

    SORT BY age DESC, last_name

    C

    ORDER BY age DESC, last_name

    D

    ORDER BY age ASC, last_name


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

  • 第23题:

    单选题
    在Person的一个派生类Employee里调用Person类的构造函数正确方式为()。
    A

    base.Person(name,age)

    B

    base(name,age)

    C

    Person(name,age)

    D

    this(name,age)


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

  • 第24题:

    单选题
    Given the uncompleted code of a class:     class Person {  String name, department;     int age;  public Person(String n){  name = n; }  public Person(String n, int a){  name = n;  age = a;  }  public Person(String n, String d, int a) {  // doing the same as two arguments version of constructor     // including assignment name=n,age=a    department = d;     }     }  Which expression can be added at the "doing the same as..." part of the constructor?()
    A

     Person(n,a);

    B

     this(Person(n,a));

    C

     this(n,a);

    D

     this(name,age);


    正确答案: A
    解析: 在同一个类的不同构造方法中调用该类的其它构造方法需要使用this(…)的形式,而且必须是在构造方法的第一行调用,这个和普通的方法重载调用的方式不同,普通的方法可以直接使用方法名加参数来调用,而且调用位置没有限制,因此答案A是不行的,B的语法就是错误的,D的错误在于在父类型的构造函数被调用前不能引用类的成员。构造方法是一个类对象实例化的起点(虽然严格来说首先执行的并不是构造方法的第一个语句,而是内存的分配),因此在构造方法中不能将成员作为参数引用。