网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
A person calls in asking for the name of the vendor that the technician uses for the organizations firewall hardware. Which of the following is the BEST action for the technician to take?()
A
Immediately forward the call to the vendor.
B
Give the information to the caller.
C
Hang up on the caller immediately and report the call to upper management.
D
Politely refuse to give the information and end the call.
参考答案
参考解析
解析:
暂无解析
更多 “单选题A person calls in asking for the name of the vendor that the technician uses for the organizations firewall hardware. Which of the following is the BEST action for the technician to take?()A Immediately forward the call to the vendor.B Give the information to the caller.C Hang up on the caller immediately and report the call to upper management.D Politely refuse to give the information and end the call.” 相关考题
考题
When ________, John did not reply.
(A) he asking what his name was(B) was asked what his name was(C) asking what John’s name was(D) asked what his name was
考题
在J2EE中,使用()选项中的代码,可以生成如下XML文档:PEOPLEPERSONNAMETonyBlair/NAME/PERSONPEOPLE
A.Elementpeople=doc.createElement(PEOPLE);Elementperson=doc.createElement(PERSON);Elementname=doc.createElement(NAME);name.appendChild(doc.createTextNode(TonyBlair));people.appendChild(person);person.appendChild(name);doc.appendChild(people);B.Elementpeople=doc.createElement(PEOPLE);Elementperson=doc.createElement(PERSON);people.appendChild(person);Elementname=doc.createElement(NAME);name.appendChild(doc.createTextNode(TonyBlair));person.appendChild(name);doc.appendChild(people);C.Elementpeople=doc.createElement(PEOPLE);Elementperson=doc.createElement(PERSON);people.appendChild(person);Elementname=doc.createElement(NAME);name.appendText(doc.createTextNode(TonyBlair));person.appendChild(name);doc.appendChild(people);D.Elementpeople=doc.createElement(PEOPLE);Elementperson=doc.createElement(PERSON);Elementname=doc.createElement(NAME);name.createTextNode(TonyBlair);people.appendChild(person);person.appendChild(name);doc.appendChild(people);
考题
为使下列代码正常运行,应该在下划线处填入的选项是abstract class Person{public Person(String n)!name=n;}public____String getDescription();public String getName(){return name;}private String name;}A.staticB.privateC.abstractD.final
考题
class Person{ String name,department; int age; public Person(Stringn){name=n;} public Person(String n, int a){name=n;age=a;} publicPerson(String n,String d,int a){ doing the same as two argumentsversion of constructer including assignment name=n,age=a } } 下列哪一个选项可以添加到“doing the same....”处?()APerson(n,a)Bthis(Person(n,a))Cthis(n,a)Dthis(name,age
考题
给出下列的不完整的类代码,则哪个语句可以被加到横线处? ( ) class Person{ String name,department; int age; public Person(String n){name=n;} public Person(String n,int s){name=n; age=a;} public Person(String n,String d,int a){ department=d;______ } }A.Person(n,a);B.this(Person(n,a));C.this(n,s);D.this(name,age);
考题
有以下程序:includeincludeusingnameSpacestd;classperson{ intage; Char*nam
有以下程序:include <iostream>include <string>using nameSpace std;class person{int age;Char * name;public:person ( int i, Char * str ){int j;j = strlen( str ) + 1;name = new char[ j ];strcpy( name, str );age = i;}~person(){delete name;cout<<"D";}void display(){cout<<name<<":"<<age;}};int main(){person demo( 30,"Smith" );demo.display();return 0;}则该程序的输出结果为:【 】。
考题
publicclassPerson{privatename;publicPerson(Stringname){this.name=name;}publicbooleanequals(Objecto){if(!oinstanceofPerson)returnfalse;Personp=(Person)o;returnp.name.equals(this.name);}}Whichistrue?()
A.CompilationfailsbecausethehashCodemethodisnotoverridden.B.AHashSetcouldcontainmultiplePersonobjectswiththesamename.C.AllPersonobjectswillhavethesamehashcodebecausethehashCodemethodisnotoverridden.D.IfaHashSetcontainsmorethanonePersonobjectwithname=”Fred”,thenremovinganother person,alsowithname=”Fred”,willremovethemall.
考题
阅读下面代码 abstract class Person { public Person(String n) { name=n; } public______String getDescription(); public String getName() { return name; } private String name; } 在下画线处应填入的修饰符是A.staticB.abstractC.protectedD.final
考题
给出下列的不完整的类代码,则下列的( )语句可以加到横线处。 class Person{ String name,department; int age public Person(String n){name=n;} public Person(String n,int a){name=n;age=a;} pubilc Person(String n,String d,int a) { _______________ department=d; } }A.Person(n,a);B.this(Person(n,a));C.this(n,a);D.this(name,age);
考题
给出下面不完整的类代码,则横线处的语句应该为( )。 class Person { String name,department; int age; public Person (Strings) {name=s;} public Person (String s,intA.{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);
考题
为使下列代码正常运行,应该在下画线处填入的选项是( )。 abstract class person{ public Person(String n){ name=n: } Public String getDescription; public String getName{ return name; } private string name; }A.staticB.privateC.abstractD.final
考题
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; }
考题
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;
考题
public class Person { private name; public Person(String name) { this.name = name; } public int hashCode() { return 420; } } Which is true?() A、 The time to find the value from HashMap with a Person key depends on the size of the map.B、 Deleting a Person key from a HashMap will delete all map entries for all keys of typePerson.C、 Inserting a second Person object into a HashSet will cause the first Person object to beremoved as a duplicate.D、 The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map.
考题
在Person的一个派生类Employee里调用Person类的构造函数正确方式为()。A、base.Person(name,age)B、base(name,age)C、Person(name,age)D、this(name,age)
考题
When choosing a hostname, which of the following naming conventions is most important to consider?()A、The name is unique globallyB、The name is unique in a specified domainC、The name is not named after a person, place or thingD、The name has special meaning to the machine’s function
考题
public class Person { private name; public Person(String name) { this.name = name; } public boolean equals(Object o) { if( !o instanceof Person ) return false; Person p = (Person) o; return p.name.equals(this.name); } } Which is true?() A、 Compilation fails because the hashCode method is not overridden.B、 A HashSet could contain multiple Person objects with the same name.C、 All Person objects will have the same hash code because the hashCode method is not overridden.D、 If a HashSet contains more than one Person object with name=”Fred”, then removing another person, also with name=”Fred”, will remove them all.
考题
单选题public class Person { private name; public Person(String name) { this.name = name; } public boolean equals(Object o) { if( !o instanceof Person ) return false; Person p = (Person) o; return p.name.equals(this.name); } } Which is true?()A
Compilation fails because the hashCode method is not overridden.B
A HashSet could contain multiple Person objects with the same name.C
All Person objects will have the same hash code because the hashCode method is not overridden.D
If a HashSet contains more than one Person object with name=”Fred”, then removing another person, also with name=”Fred”, will remove them all.
考题
多选题在J2EE中,使用()选项中的代码,可以生成如下XML文档: Tony BlairAElement people = doc.createElement(PEOPLE); Element person = doc.createElement(PERSON); Element name = doc.createElement(NAME); name.appendChild(doc.createTextNode(Tony Blair)); people.appendChild(person); person.appendChild(name); doc.appendChild(people);BElement people = doc.createElement(PEOPLE); Element person = doc.createElement(PERSON); people.appendChild(person); Element name = doc.createElement(NAME); name.appendChild(doc.createTextNode(Tony Blair)); person.appendChild(name); doc.appendChild(people);CElement people = doc.createElement(PEOPLE); Element person = doc.createElement(PERSON); people.appendChild(person); Element name = doc.createElement(NAME); name.appendText(doc.createTextNode(Tony Blair)); person.appendChild(name); doc.appendChild(people);DElement people = doc.createElement(PEOPLE); Element person = doc.createElement(PERSON);Element name = doc.createElement(NAME); name.createTextNode(Tony Blair); people.appendChild(person); person.appendChild(name); doc.appendChild(people);
考题
单选题She is such a_______person, always asking how I'm feeling.A
considerableB
consideringC
consideredD
considerate
考题
单选题public class Person { private name; public Person(String name) { this.name = name; } public int hashCode() { return 420; } } Which is true?()A
The time to find the value from HashMap with a Person key depends on the size of the map.B
Deleting a Person key from a HashMap will delete all map entries for all keys of typePerson.C
Inserting a second Person object into a HashSet will cause the first Person object to beremoved as a duplicate.D
The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map.
考题
单选题1. public class Person { 2. private String name; 3. public Person(String name) { this.name = name; } 4. public boolean equals(Person p) { 5. return p.name.equals(this.name); 6. } 7. } Which is true?()A
The equals method does NOT properly override the Object.equals method.B
Compilation fails because the private attribute p.name cannot be accessed in line 5.C
To work correctly with hash-based data structures, this class must also implement the hashCode method.D
When adding Person objects to a java.util.Set collection, the equals method in line 4 will prevent duplicates.
考题
单选题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;
考题
单选题Which statement is true?()A
Compilation fails because the hashCode method is not overridden.B
A HashSet could contain multiple Person objects with the same name.C
All Person objects will have the same hash code because the hashCode method is not overridden.D
If a HashSet contains more than one Person object with name="Fred", then removing another Person, also with name="Fred", will remove them all.
考题
单选题在Person的一个派生类Employee里调用Person类的构造函数正确方式为()。A
base.Person(name,age)B
base(name,age)C
Person(name,age)D
this(name,age)
考题
单选题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);
热门标签
最新试卷