网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

在以下事件过程中,Public表示()。 Public Sub txtName_Change() …… EndSub

  • A、此过程不可以被本模块中的过程调用
  • B、此过程只可以被本窗体模块中的其它过程调用
  • C、此过程不可以被任何其它过程调用
  • D、此过程可以被本工程中的所有模块调用

参考答案

更多 “ 在以下事件过程中,Public表示()。 Public Sub txtName_Change() …… EndSubA、此过程不可以被本模块中的过程调用B、此过程只可以被本窗体模块中的其它过程调用C、此过程不可以被任何其它过程调用D、此过程可以被本工程中的所有模块调用” 相关考题
考题 以下过程的定义中,( )是错误的。 A、Public Sub Sum(x ; y)B、Public Sub Sum(ByVal x, ByVal y)C、Public Sub Sum(x As Integer,y As Integer)D、Public Sub Sum(x%, y%)

考题 有以下程序:include using namespace std; class Base { public: Base() { K=0; } int 有以下程序:include<iostream>using namespace std;class Base{public:Base(){K=0;}int x;};class Derivedl:virtual public Base{public:Derivedl(){x=10;}};class Derived2:virtua1 public Base

考题 执行下列代码后,输出的结果为( )。 class Base { int x = 30; void setX( ) {x=1O;} } class SubClass extends Base { int x=40; void setX ( ) {x=20;} int getX( ) {return super. x; } } public class Test { public static void main(String[ ] args) { SubClass sub=new SubClass( ); sub. setX( ); System. out. println(sub, getX( ) ); } }A.10B.20C.30D.40

考题 阅读以下说明以及Java程序。【说明】传输门是传输系统中的重要装置。传输门具有Open(打开)、Closed(关闭)、Opening (正在打开)、StayOpen(保持打开)和Closing(正在关闭)五种状态。触发状态的转换事件有click、complete和timeout三种。事件与其相应的状态转换如下图所示。下面的Java代码1与Java代码2分别用两种不同的设计思路对传输门进行状态模拟,请填补代码中的空缺。【Java代码1】public class Door {public static final int CLOSED = 1; public static final int PENING = 2;public static final int PEN = 3; public static final int CLOSING = 4;public static final int STAYOPEN = 5; private int state = CLOSED;//定义状态变量,用不同的整数表示不同状态private void setState(int state){ this.state = state;}//设置传输门当前状态public void getState() {//此处代码省略,本方法输出状态字符串,//例如,当前状态为CLOSED时,输出字符串为"CLOSED"}public void click() { //发生click事件时进行状态转换if ((1);) setState(OPENING);else if ((2);) setState{CLOSING);else if ((3);) setState(STAYOPEN);}//发生timeout事件时进行状态转换public void timeout() { if (state == OPEN) setState(CLOSING);}public void complete() {//发生complete事件时进行状态转换if (state == OPENING) setState(OPEN);else if (state == CLOSING) setState(CLOSED);}public static void main(String [] args){Door aDoor = new Door();aDoor.getState();aDoor.click();aDoor.getState();aDoor.complete();aDoor.getState();aDoor.click();aDoor.getState();aDoor.click();aDoor.getState();return;}}【Java代码2】public class Door {public final DoorState CLOSED = new DoorClosed(this);public final DoorState PENING = new DoorOpening(this);public final DoorState PEN = new DoorOpen(this);public final DoorState CLOSING = new DoorClosing(this);public final DoorState STAYOPEN = new DoorStayOpen(this);private DoorState state = CLOSED;//设置传输门当前状态public void setState(DoorState state) { this.state=state;}public void getState(){ //根据当前状态输出对应的状态字符串System.out.println(state.getClass().getName());}public void click(){(4);}//发生click事件时进行状态转换public void timeout(){(5);}//发生timeout事件时进行状态转换public void complete(){(6);)//发生complete事件时进行状态转换public static void main(String[]args){Door aDoor = new Door();aDoor.getState();aDoor.click();aDoor.getState();aDoor.complete();aDoor.getState();aDoor.timeout();aDoor.getState();return;}}public abstract class DoorState { //定义所有状态类的基类protected Door door ;public DoorState(Door doer) { this.door = door;}public void click() {}public void complete() {}

考题 写出程序运行的结果Public class BasePublic virtual string Hello() {return “Base”;}Public class Sub:BasePublic override string Hello() {return “Sub”;}1. Base b = new Base(); b.Hello;2. Sub s = new Sub(); s.Hello;3. Base b = new Sub (); b.Hello;4. Sub s = new Base(); s.Hello;

考题 根据委托(delegate)的知识,请完成以下用户控件中代码片段的填写:namespace test{public delegate void OnDBOperate();public class UserControlBase : System.Windows.Forms.UserControl{public event OnDBOperate OnNew;privatevoidtoolBar_ButtonClick(objectsender,System.Windows.Forms.ToolBarButtonClickEventArgs e){if(e.Button.Equals(BtnNew)){//请在以下补齐代码用来调用OnDBOperate委托签名的OnNew事件。}}}

考题 若有以下程序:include using namespace std;class A{protected: int a;public: A() { 若有以下程序: #include <iostream> using namespace std; class A { protected: int a; public: A() { a=10; } }; class A1 : public A { public: A1() { a=a+1; } }; class A2 : public A { public: A2 () { a=a+2; } }; class B : public A1,public A2 { public: B(){} void print() { cout<<a<<end1; } }; int main ( ) { B obj; obj.print(); return 0; } 程序运行后的输出结果是( )。A.产生语法错误B.11C.12D.10

考题 以下程序的执行结果为______。include class A {public:A(){cout 以下程序的执行结果为______。include<iostream.h>class A{public:A(){cout<<“a”;}~A(){cout<<“b”;}};class B:public A{public:B(){cout<<“c”;)~B(){cout<<“d”;}};void main(){B b;}

考题 以下定义的过程()是按“传值”方式传递参数的。A、Public Sub Sum(x,y)B、Public Sub Sum(ByVal x, ByVal y)C、Public Sub Sum(x As Integer,y As Integer)D、Public Sub Sum(x%, y%)

考题 public class Base {  public static final String FOO = “foo”;  public static void main(String[] args) {  Base b = new Base();  Sub s = new Sub();  System.out.print(Base.FOO);  System.out.print(Sub.FOO);  System.out.print(b.FOO);  System.out.print(s.FOO);  System.out.print(((Base)s).FOO);  } }  class Sub extends Base {public static final String FOO=bar;}  What is the result?() A、 foofoofoofoofooB、 foobarfoobarbarC、 foobarfoofoofooD、 foobarfoobarfooE、 barbarbarbarbarF、 foofoofoobarbarG、 foofoofoobarfoo

考题 class super {   public float getNum() {return 3.0f;}   }   public class Sub extends Super {   }   Which method, placed at line 6, will cause a compiler error?()A、 Public float getNum() {return 4.0f; }B、 Public void getNum (){}C、 Public void getNum (double d){}D、 Public double getNum (float d) {retrun 4.0f; }

考题 class super {  public int getLength()  {return 4;}  }  public class Sub extends Super {  public long getLength() {return 5;}  public static void main (String[]args)  {  super sooper = new Super ();  Sub sub = new Sub();  System.out.printIn(  sooper.getLength()+ “,” + sub.getLength()   };  }  What is the output?()  A、 4, 4B、 4, 5C、 5, 4D、 5, 5E、 The code will not compile.

考题 class Super {  public int i = 0;  public Super(String text) {  i = 1; }  }  public class Sub extends Super {  public Sub(String text) {  i = 2;  }   public static void main(String args[]) {  Sub sub = new Sub(“Hello”);  System.out.println(sub.i);  }  }  What is the result?()  A、 0B、 1C、 2D、 Compilation fails.

考题 如果要在窗体代码编辑器的“通用”部分定义私有Sub过程,则正确的语句是()。A、Public SubB、Private SubC、Public FunctionD、Private Function

考题 下列定义abc过程的语句,正确的是()A、Dim Sub abc(x,y)B、Public abc(x,y)C、Private Sub abc(x,y)As IntegerD、Sub abc(x,y)

考题 在J2EE中,以下是firePropertyChange的原型,正确的是()。 A、public void firePropertyChange(PropertyChangeListener l,String oldValue, String newValue)B、public void firePropertyChange(String propertyName, Object oldValue, Object newValue)C、public void firePropertyChange(PropertyChangeSupport changes)D、public void firePropertyChange(Object oldValue, Object newValue)

考题 1. class super {  2. public float getNum() {return 3.0f;}  3. }  4.    5. public class Sub extends Super { 6.   7. }   Which method, placed at line 6, will cause a compiler error?()  A、  Public float getNum()   {return 4.0f; }B、  Public void getNum ()  { }C、  Public void getNum (double d)   { }D、  Public double getNum (float d) {retrun 4.0f; }

考题 You are creating an ASP.NET Web site. You create a HTTP module named Custom Module, and you register the module in the web.config file.The Custom Module class contains the following code. Public Class Custom Module  Implements IHttpModule     Dim footerContent As String = Footer Content"Public Sub Dispose() Implements IHttpModule.DisposeEnd SubEnd Class  You need to add code to CustomModule to append the footer content to each processed ASP.NET page. Which code segment should you use?()A、Public Sub New(ByVal app As HttpApplication) AddHandler app.EndRequest, AddressOf app_EndRequest  End Sub  Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs)    Dim app As HttpApplication = TryCast(sender, HttpApplication)  app.Response.Write(footerContent)  End Sub B、Public Sub Init(ByVal app As HttpApplication) _  Implements IHttpModule.Init  AddHandler app.EndRequest, AddressOf app_EndRequest  End Sub Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs)  Dim app As HttpApplication = New HttpApplication()  app.Response.Write(footerContent)  End Sub C、Public Sub New()  Dim app As HttpApplication = New HttpApplication()  AddHandler app.EndRequest, AddressOf app_EndRequest End Sub  Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs)  Dim app As HttpApplication = TryCast(sender, HttpApplication)  app.Response.Write(footerContent)  End Sub D、Public Sub Init(ByVal app As HttpApplication) _  Implements IHttpModule.Init  AddHandler app.EndRequest, AddressOf app_EndRequest  End Sub  Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs)  Dim app As HttpApplication = TryCast(sender, HttpApplication)app.Response.Write(footerContent)  End Sub

考题 单选题class Super {  public int i = 0;  public Super(String text) {  i = 1; }  }  public class Sub extends Super {  public Sub(String text) {  i = 2;  }   public static void main(String args[]) {  Sub sub = new Sub(“Hello”);  System.out.println(sub.i);  }  }  What is the result?()A  0B  1C  2D  Compilation fails.

考题 单选题class Super {  public Integer getLenght() { return new Integer(4); } }  public class Sub extends Super {  public Long GetLenght() { return new Long(5); }  public static void main(String[] args) { Super sooper = new Super();  Sub sub = new Sub();  System.out.println(  sooper.getLenght().toString() + “,” +  sub.getLenght().toString() ); } }  What is the output?()A  4,4B  4,5C  5,4D  5,5E  Compilation fails.

考题 单选题1. class super {  2. public float getNum() {return 3.0f;}  3. }  4.    5. public class Sub extends Super { 6.   7. }   Which method, placed at line 6, will cause a compiler error?()A   Public float getNum()   {return 4.0f; }B   Public void getNum ()  { }C   Public void getNum (double d)   { }D   Public double getNum (float d) {retrun 4.0f; }

考题 单选题class super {  public int getLength()  {return 4;}  }  public class Sub extends Super {  public long getLength() {return 5;}  public static void main (String[]args)  {  super sooper = new Super ();  Sub sub = new Sub();  System.out.printIn(  sooper.getLength()+ “,” + sub.getLength()   };  }  What is the output?()A  4, 4B  4, 5C  5, 4D  5, 5E  The code will not compile.

考题 单选题class super {   public float getNum() {return 3.0f;}   }   public class Sub extends Super {   }   Which method, placed at line 6, will cause a compiler error?()A  Public float getNum() {return 4.0f; }B  Public void getNum (){}C  Public void getNum (double d){}D  Public double getNum (float d) {retrun 4.0f; }

考题 单选题class super (   public int I = 0;   public super (string text) (   I = 1   )   )     public class sub extends super (   public sub (string text) (   i= 2   )   public static void main (straing args) (  sub sub = new sub (“Hello”);   system.out. PrintIn(sub.i);  )   )   What is the result?()A  Compilation will fail.B  Compilation will succeed and the program will print “0”C  Compilation will succeed and the program will print “1”D  Compilation will succeed and the program will print “2”

考题 多选题1. class Super {  2. private int a;  3. protected Super(int a) { this.a = a; }  4. }  .....  11. class Sub extends Super {  12. public Sub(int a) { super(a); }  13. public Sub() { this.a= 5; }  14. }  Which two, independently, will allow Sub to compile?()AChange line 2 to: public int a;BChange line 2 to: protected int a;CChange line 13 to: public Sub() { this(5); }DChange line 13 to: public Sub() { super(5); }EChange line 13 to: public Sub() { super(a); }

考题 单选题public class Base {  public static final String FOO = “foo”;  public static void main(String[] args) {  Base b = new Base();  Sub s = new Sub();  System.out.print(Base.FOO);  System.out.print(Sub.FOO);  System.out.print(b.FOO);  System.out.print(s.FOO);  System.out.print(((Base)s).FOO);  } }  class Sub extends Base {public static final String FOO=bar;}  What is the result?()A  foofoofoofoofooB  foobarfoobarbarC  foobarfoofoofooD  foobarfoobarfooE  barbarbarbarbarF  foofoofoobarbarG  foofoofoobarfoo

考题 单选题在以下事件过程中,Public表示()。 Public Sub txtName_Change() …… EndSubA 此过程不可以被本模块中的过程调用B 此过程只可以被本窗体模块中的其它过程调用C 此过程不可以被任何其它过程调用D 此过程可以被本工程中的所有模块调用