阅读下面代码 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

阅读下面代码 abstract class Person { public Person(String n) { name=n; } public______String getDescription(); public String getName() { return name; } private String name; } 在下画线处应填入的修饰符是

A.static

B.abstract

C.protected

D.final


相关考题:

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

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;}则该程序的输出结果为:【 】。

下列程序运行后的输出结果是( )。#include#includeusing namespace std;class Person{public:Person(string n):name(n) { coutprivate:int year,month,day;};class Student:public Person{public:Student(string n,int y,int m,int d,char c):birthday(y,m,d),sex(c),Person(n) { coutA. SB.PSC.DPSD.PDS

给出下列的不完整的类代码,则下列的( )语句可以加到横线处。 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);

根据下面定义,能打印出字母’H’的语句是() A.printf(%c\n,class[3].name)B.printf(%c\n,class[3].name[1])C.printf(%c\n,class[2].name)D.printf(%c\n,class[2].name[0]

给出下列的不完整的类代码,则下列的哪个语句可以加到横线处? 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 ) { _____________ department = d; } }A.Person(n,a);B.this(Person(n,a) );C.this(n,a);D.this(name,age);