首页/ 题库 / [单选题]Given:10. interface 的答案

Given:10. interface Data { public void load(); }11. abstract class Info { public abstract void load(); }Which class correctly uses the Data interface and Info class?()()

单选题
2021-07-17 20:19
A、仅纵筋达到屈服强度
查看答案

正确答案
A

试题解析

标签:
感兴趣题目
下面的代码中方法unsafe()有异常发生,那么可以加在第一行的语句为( )。 { if(unsafe()) { //do something } else if(safe()) { //do the other} } Ⅰ:public void methodName() Ⅱ:public void methodName() throw IOException Ⅲ:public void methodName() throws IOException Ⅳ:public void methodName() throws Exception
下面类的声明中的几个语句,正确的是(设定语句是主函数中的语句)( )。 class TestClass { private: int data; public: TestClass(int g_data) { data=g_data; } void show(){cout<<data<<end1;) };
在下面的定义语句中,画线处应填入的内容是 class Fred{ public: void print( ){cout<<data<<endl;} void setData(double D) {data=d;} static int count; private: double data; }; ______count=0;//静态数据成员的定义
Given:10. interface Data { public void load( ); }11. abstract class Info { public abstract void load( ); }Which class correctly uses the Data interface and Info class?()()
Given:10. interface Data { public void load( ); }11. abstract class Info { public abstract void load( ); }Which class correctly uses the Data interface and Info class?()()
Given:10. interface Data { public void load(); }11. abstract class Info { public abstract void load(); }Which class correctly uses the Data interface and Info class?()()

现有: 
interface Data {public void load();} 
abstract class Info {public abstract void load();}     
下列类定义中正确使用Data和Info的是哪项?() 

public class SomeException {  } Class a:  public class a {  public void doSomething() { }  } Class b:  public class b extends a {  public void doSomething() throws SomeException { }  }  Which is true about the two classes?() 
Given the following code:    public class Test {  void printValue(int m){  do {  System.out.println("The value is"+m);     }  while( --m > 10 )     }  public static void main(String arg[]) {     int i=10;  Test t= new Test();     t.printValue(i);     }     }  Which will be output?()    
下列程序段中,正确的是______。 ①class MvClass { int var = 100; static int getVar() { return var; } } ②public class MyClass { final int date; void MyClass (int d) { date = d; } } ③public class MyMain { public static void main(String args[]) { System.out.println(Myclass1.date); } } class MyClass1 { int data = 10; } ④class IamAbstract { final int f; double d; abstrct void method(); }
下列类的定义中,有( )处语法错误。 class Base { public: Base(){} Base(int i) { data=i; } private: int data; }; class Derive : public Base { public: Derive() : Base(O) {} Derive (int x) { d=x; } void setvalue(int i) { data=i; } private: int d; };
下面程序的结果是 ______。 #include<iostream.h> class A{ public: virtual void fun()=0{}; }; class B:public A{ public: void fun () {cout<< "new file" ;} }; class C: public A{ public: void fun (){cout<<"open file"<< " " } }; class D: public A{ public: void fun () {cout<< "save file " ;} }; void main() { A a,*p; B b; C c; D d; p=&c; p->fun (); p=&b; p->fun (); p=&d; p->fun(); }
相关题目
有如下程序: class Base1 { public: int a; void b() { return}; void c(float) { a=float;} }; class Base2 { public: void b(){} void c(){} private: int a; }; class Derived:public Basel,public Base2 { public: void b(){} }; void main() { Derived obj; obj.a=1; //① obj.b(); //② obj.c(10); //③ } 下面各项对语句①②③的描述中,正确的是( )。
下面的代码中方法unsafe()有异常发生,那么可以加在第一行的语句为( )。 { if(unsafe()) { //do something } else if(safe()) { //do the other} } Ⅰ:public void methodName() Ⅱ:public void methodName() throw IOException Ⅲ:public void methodName() throws IOException Ⅳ:public void methodName() throws Exception
下面程序的结果是 ______。 #include<iostream.h> class A{ public: virtual void fun()=0{}; }; class B:public A{ public: void fun () {cout<< "new file" ;} }; class C: public A{ public: void fun (){cout<<"open file"<< " " } }; class D: public A{ public: void fun () {cout<< "save file " ;} }; void main() { A a,*p; B b; C c; D d; p=&c; p->fun (); p=&b; p->fun (); p=&d; p->fun(); }
下面程序的运算结果是( )。 #include<iostream> using namespace std; class A { public: virtual void fun()=0; }; class B:public A } public: void fun() {cout<<"new file"<<" ";} }; class C:public A { public: void fun() { cout<<"open file"<<" ";} }; void main() { A a, * p; B b;C c; p=&c; p->fun(); p=&b; }
下列程序实现了2个监听器接口:ActionListener和W1ndowListener。 import java.awt.*; import java.awt.event.*; public class ex39______ { public static void main(String[] args) { ex39 bj = new ex39(); obj .go(); } public void go() { Frame. f = new Frame("ex39"); f.addWindowListener(this); Button b = new Button("Button"); b.addActionListener(this); f.add(b); f.pack(); f.setVisible(true); } public void actionPerformed(ActionEvent e) { System.out.println("Button pressed!"); } public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} public void windowClosed(WindowEvent e) {} public void windowClosing(WindowEvent e){System.exit(1); public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e) {} public void windowOpened(WindowEvent e){} } 请选择正确的语句填入横线处。
Given:10. interface Data { public void load(); }11. abstract class Info { public abstract void load(); }Which class correctly uses the Data interface and Info class?()()
对于类定义 classA{ public: virtual void func1(){} void func2(){} }; Class B:public A{ public: void funcl(){cout <<”class B func1” <<end1;} virtual void func2(){cout <<"class B func 2" <<end1;} }; 下面正确的叙述是
对于类定义 class A { public: virtual void funcl(){} void func2(){} }; class D:public A{ public: void funcl(){cout<< "class B rune 1"<<end1;} virtual void func2(){cout<< "class B func 2"<<end1;} }; 下面正确的叙述是 ______。
对于类定义: class A{ public: virtual void func1( ){} void func2( ){} }; class B:public A{ public: void func1(){cout<<"class B func 1"<<end1;} virtual void func2(){cout<<"class B func 2"<<end1;} }; 下面叙述正确的是(53)。
对于类定义 class A{ public: virtual void func1( ){} void func2( ){} }; class B:public A{ public: void func1( ){cout<<"class B func 1"< < end1;} virtual void func2( ){cout << "class B func2"<< end1;} }; 下面正确的
下面程序的运算结果是( )。 #include<iostream> using namespace std; class A { public: virtual void fun()=0; }; class B:public A } public: void fun() {cout<<"new file"<<" ";} }; class C:public A { public: void fun() { cout<<"open file"<<" ";} }; void main() { A a, * p; B b;C c; p=&c; p->fun(); p=&b; }
在下面的类定义中,横线处应填入的内容是( )。class Fred{ public: void print() {cout<<data<<end1; void setData(double d)( data=d; static int count; private: double data;};_______________________ count=O; //静态数据成员的定义
在下面的类定义中,横线处应填入的内容是( )。 class Fred { public: void print(){cout<<data<<end1;} void setData(double d}{data=d;} static int count; private: double data; }; ______count=0; //静态数据成员的定义
在下面的类定义中,横线处应填入的内容是 class Fred { public: void print(){cout<<data<<endl;} void setData(double d)(data=d;} static int count; private: double data; }; count=0; //静态数据成员的定义
下列程序的输出结果是 interface Inter{ public final static int A=100; } class My implements Inter{ public static void main (String args[ ]) {System.out.println(A) ; }
若有以下程序: #include <iostream> using namespace std; class data { public: int x; data (int x) { data: :x=x; } }; class A { private: data d1; public: A(int x) : d1 (x) { } void dispa() { cout<<d1, x<<", "; } }; class B: public A { private: data d2; public: B(int x) : A(x-1),d2(x) {} void dispb() { cout<<d2.x<<end1; } }; class C : public B { public: C(int x) : B(x-1){} void disp () { dispa ( ); dispb (); } }; int main ( ) { C obj (5); obj.disp(); return 0; } 程序执行后的输出结果是( )。
若有以下程序: #include<iostream> using namespace std; class data { public: int x; data(int x) { data::x=x; } }; class A { private: data d1; public: A(int x):d1(x){} void dispa() { cout<<d1.X<<","; } }; classB:public A { private: data d2; public: B(int x):A(x-1),d2(x){} void dispb() { cout<<d2.x<<end1; } }; class C:public B { public: C(int x):B(x-1){} void disp() { dispa(); dispb(); } }; int main() { C obj(5); obj.disp(); return 0; } 程序执行后的输出结果是
若有以下程序: #include<iostream> using namespace.std; class data { public: int x; data (int x) { data::x=x; } ); class A { private: data d1; public: A(int x) :dl(X){} void dispa() { cout<<dl.X<<","; } }; class B:public A { private: data d2; public: B(int x) : A(x-1),d2(x){} void dispb() { cout<<d2.x<<endl; } }; class C:public B { public: C(int x) :B(x-1){} void disp() { dispa(); dispb(); } }; int main() { C obj(5); obj.disp(); return 0; } 程序执行后的输出结果是
若有以下程序: #include<iostream> using namespace std; class data { public: int x; data(int x) { data::x=x; } class A private: data dl; public: A(int x): dl(x){ } void dispaO cout<<dl.x<<","; } }; class B: public A { private: data d2; public: B(int x):A(x-1),d2(x){ } void dispb() { cout<<d2.x<<endl; } }; class C: public B { public: C(int x):B(x-1){ } void disp0 { dispa(); dispb(); } }; int main() { C obj(5); obj.disp(); return 0; } 程序执行后的输出结果是( )。
有如下程序: class Base1 { public: int a; void b() { return}; void c(float) { a=float;} }; class Base2 { public: void b(){} void c(){} private: int a; }; class Derived:public Basel,public Base2 { public: void b(){} }; void main() { Derived obj; obj.a=1; //① obj.b(); //② obj.c(10); //③ } 下面各项对语句①②③的描述中,正确的是( )。
广告位招租WX:84302438

免费的网站请分享给朋友吧