下列哪个方法可用于创建一个可运行的类
A: publicclassXimplementsRunable{publicvoidrun(){......}}
B: publicclassXimplementsThread{publicvoidrun(){......}}
C: publicclassXimplementsThread{publicintrun(){......}}
D: publicclassXimplementsRunable{protectedvoidrun(){......}}
A: publicclassXimplementsRunable{publicvoidrun(){......}}
B: publicclassXimplementsThread{publicvoidrun(){......}}
C: publicclassXimplementsThread{publicintrun(){......}}
D: publicclassXimplementsRunable{protectedvoidrun(){......}}
举一反三
- 下面哪些方法可用于创建一个可运行的多线程类?() A: publicclassTimplementsRunable{publicvoidrun(){…}} B: publicclassTextendsThread{publicvoidrun(){…}} C: publicclassTimplementsThread{publicvoidrun(){…}} D: publicclassTimplementsThread{publicintrun(){….}} E: publicclassTimplementsRunable{protectedvoidrun(){…}}
- 下列哪个方法可用于创建一个可运行的类? ( )
- 下列关于Test类的定义中,正确的是()。 A: classTestimplementsRunnable{publicvoidrun{}DublicvoidsomeMethod[]{}} B: classTestimplementsRunnable(puIblicvoidrun;} C: classTestimplementsRunnable(DublicvoidsomeMethod[];} D: classTestimplementsRunnable(publicvoidsomeMethod{}}
- 以下C#代码中,关于虚方法和抽象方法使用正确的是() A: publicabstractclassAnimal{publicAnimal(){}}publicabstractvoidRun():Animal{publicCat(){}publicvoidRun(){}} B: publicclassAnimal{publicAnimal(){}}publicabstractvoidRun():Animal{publicCat(){}publicvoidRun(){}} C: publicabstractclassAnimal{publicAnimal(){}publicabstractvoidRun();}publicclasscat:Animal{publicCat(){}publicoverridevoidRun(){}} D: publicvirtualclassAnimal{publicAnimal(){}publicvirtualvoidRun();}publicclasscat:Animal{publicCat(){}publicoverridevoidRun(){}}
- 中国大学MOOC: 下列( )方法可用于创建一个可运行的类。