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

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

class Guy { String greet() { return "hi "; } }  class Cowboy extends Guy { String greet() { return "howdy "; } }  class Wrangler extends Cowboy { String greet() { return "ouch! "; } }  class Greetings2 {  public static void main(String [] args) {  Guy g = new Wrangler();  Guy g2 = new Cowboy();  Wrangler w2 = new Wrangler();  System.out.print(g.greet()+g2.greet()+w2.greet());  }  }  结果是什么?() 

  • A、hi hi ouch!
  • B、hi howdy ouch!
  • C、ouch! howdy ouch!
  • D、编译失败

参考答案

更多 “ class Guy { String greet() { return "hi "; } }  class Cowboy extends Guy { String greet() { return "howdy "; } }  class Wrangler extends Cowboy { String greet() { return "ouch! "; } }  class Greetings2 {  public static void main(String [] args) {  Guy g = new Wrangler();  Guy g2 = new Cowboy();  Wrangler w2 = new Wrangler();  System.out.print(g.greet()+g2.greet()+w2.greet());  }  }  结果是什么?() A、hi hi ouch!B、hi howdy ouch!C、ouch! howdy ouch!D、编译失败” 相关考题
考题 A band or collar on the top end of a boom to which the topping lift,midships guy,and outboard guys are secured,is called the ______.A.collar bandB.guy bandC.pad eye collarD.spider band

考题 classGuy{Stringgreet(){returnhi}}classCowboyextendsGuy{Stringgreet(){returnhowdy”}}classSurferextendsGuy{Stringgreet(){returndudel”}}classGreetings{publicstaticvoidmain(string[]args){Guy[]guy={newGuy(),newCowboy(),newSurfer()};for(Guy0:guys)System.out.print(g.green());}}结果为:A.运行时异常被输出B.第7行出现一个错误,编译失败C.第8行出现一个错误,编译失败D.hihihiE.hihawdydoude

考题 下面程序输出的结果为 #include"iostream.h" class A { public: A(){cout<<"CLASSA"<<endl;} ~A() {} }; class B:public A { public: B(){cout<<"CLASSB"<<endl;} ~B() {} }; void main() { A * p; p=new B; B *q; q=new B; }A.CLASS A CLASS BB.CLASS A CLASS B CLASS BC.CLASS A CLASS B CLASS A CLASS BD.CLASS A CLASS B CLASS B CLASS B

考题 下面程序输出的结果为#include"iostream.h"class A{public:A( ){cout<<"CLASS A"<<endl;}~A( ){}};class B:public A{public:B( ){cout<<"CLASS B"<<endl;}~B( ){}};void main( ){A*p;p=new B;B *q;q=new B;}A.CLASS A CLASS BB.CLASS A CLASS B CLASS BC.CLASS A CLASS B CLASS A CLASS BD.CLASS A CLASS B CLASS B CLASS B

考题 下面程序输出的结果为 #include"iostream.h” class A { public: A(){cout<<"CLASSA"<<endl;} ~A() {} }; class B:public A { public: B(){cout<<"CLASS B"<<endl;} ~B(){} }; void main() { A*p; p=new B;A.CLASS A CLASS B CLASS B CLASS BB.CLASS A CLASS B CLASS A CLASS BC.CLASS A CLASS B CLASS BD.CLASS A CLASS B

考题 下面程序输出的结果为( )。 #inClUde”iostream.h” Class A {public: A(){cout<<“CLASS A”<<endl;} ~A()<)}; class B:public A {public: B(){cout<<”CLASSB”<<endl;} ~B(){}}; void main() {A*p; p=new B; B *q; q=new B;}A.CLASS A CLASS BB.CLASS A CLASS B CLASS BC.CLASS A ClASS BD.CLASS A CLASS B CLASS A CLASS B CLASS B CLASS B

考题 In a married falls rig at the after end of a hatch,a boom is rigged in a fore and aft line through its heel.Stresses on the outboard guy will be LEAST if the guy is made fast at a point ______.A.Abreast the heelB.At right angles to the boom when viewed from aboveC.Aft of the heelD.Forward of the spiderband

考题 The safest procedure used to rig a guy and preventer is to have the guy ______.A.and preventer have equal stressB.stronger than the preventer to minimize the danger of separationC.take a lighter load than the preventer as a safety factorD.take the stress in case the preventer parts

考题 If the cargo gear on your vessel is equipped with a regular guy and a preventer guy,you should ______.A.Let the schooner guy take most of the strain,thus transferring the load to the opposite boomB.Leave the preventer guy slackC.Secure them as close together as possible on deckD.Secure them so the angle between them is 90° at the boom head

考题 That guy is intelligent but a bit dull.A:strange B:special C:quiet D:boring

考题 The ()(吊杆托架) supports the derrick.A、derrick boom restB、derrick headC、derrick mastD、derrick guy

考题 现有:  class Guy {String greet()    {return "hi";  }  }  class Cowboy extends Guy  (  String greet()    (  return "howdy  ¨;    )  )  class Surfer extends Guy  (String greet()    (return "dude! ";)) class Greetings  {  public static void main (String  []  args)    {  Guy  []  guys =  ( new Guy(), new Cowboy(), new Surfer()  );  for (Guy g:  guys) System.out.print (g.greet()};  }  }  结果为:() A、 hi howdy dude!B、运行时异常被抛出。C、第7行出现一个错误,编译失败。D、第8行出现一个错误,编译失败。

考题 单选题The purpose of a preventer as it is used on a conventional yard and stay cargo rig is to().A allow greater than normal loads to be handled by the gearB act as an inboard guy in the event the inboard guy parts during cargo handlingC assist the outboard guy in supporting stresses during cargo handlingD prevent the inboard guy from parting due to stresses during cargo handling

考题 单选题现有:  class ThreadExcept implements Runnable  {  public void run()  {  throw new RuntimeException("exception ");  }  public static void main(Stri_ng  []  args)  {  new  Thread (new  ThreadExcept()).start();  try  {  int x=Integer.parselnt (args [0]);  Thread. sleep (x);  System.out.print("main");  } catch (Exception e)  {  }  }  }  和命令行:  java ThreadExcept l000     哪一个是结果?()A mainB 编译失败C main java.lang.RuntimeException: exceptionD 代码运行,但没有输出

考题 单选题class Guy{String greet(){return “hi“}}   class Cowboy extends Guy {String greet(){return“howdy”}}   class Surfer extends Guy {String greet(){return“dudel”}}  class Greetings{   public static void main (string[]args){   Guy[] guy= {new Guy(),new Cowboy(),new Surfer()};   for(Guy 0: guys)   System.out.print(g.green());  }   }   结果为:A 运行时异常被输出B 第7行出现一个错误,编译失败C 第8行出现一个错误,编译失败D hi hi hiE hi hawdy doude

考题 单选题When the derrick is topped, the guy must be ()(放松).A slacked offB sent awayC sent outD taken in

考题 单选题When the derrick is stopped, the guy must be().A take inB slacked offC stowedD taken

考题 单选题When the derrick is stopped, the guy must be ()(收好).A taken inB slacked offC adjustedD stowed

考题 单选题If the cargo gear on your vessel is equipped with a regular guy and a preventer guy,you should().A let the schooner guy take most of the strain,thus transferring the load to the opposite boomB leave the preventer guy slackC secure them as close together as possible on deckD secure them so the angle between them is 90°at the boom head

考题 单选题The preventer guy,as used on a conventional yard and stay rig,().A is rigged at an angle of 70°to 90°from the guy it assistsB takes the strain imposed on the schooner guy when burtoning cargoC is rigged when lifting cargo that exceeds the SWL of a single whipD should take the strain if the regular guy parts

考题 单选题现有:  class Guy  {  String greet()  {  return "hi";  } } class Cowboy extends Guy  {  String greet()  {  return. "howdy";}}  class  Wrangler  extends  Cowboy  {  String  greet()  {  return  "orch!"; } }  class Greetings2  {  public  static void main (String  []  args)  {  Guy g=new Wrangler();  Guy g2=new Cowboy();  Wrangler w2=new Wrangler();  System. out .print (g.greet()+g2.greet()+w2 .greet());  }  }  结果是什么?()A  hi hi ouch!B  ouch!  howdy  ouch!C  hi howdy ouch!D 编译失败E 运行的咐候有异常抛出

考题 单选题()away the guy.A PayB HaulC AdjustD Take

考题 单选题Don’t ()(系牢) the guy here.A fastenB unfastenC moveD shift

考题 单选题The safest procedure used to rig a guy and preventer is to have the guy().A and preventer have equal stressB stronger than the preventer to minimize the danger of separationC take a lighter load than the preventer as a safety factorD take the stress in case the preventer parts

考题 单选题现有:  class Guy {String greet()    {return "hi";  }  }  class Cowboy extends Guy  (  String greet()    (  return "howdy  ¨;    )  )  class Surfer extends Guy  (String greet()    (return "dude! ";)) class Greetings  {  public static void main (String  []  args)    {  Guy  []  guys =  ( new Guy(), new Cowboy(), new Surfer()  );  for (Guy g:  guys) System.out.print (g.greet()};  }  }  结果为:()A  hi howdy dude!B 运行时异常被抛出。C 第7行出现一个错误,编译失败。D 第8行出现一个错误,编译失败。

考题 单选题class Guy { String greet() { return "hi "; } }  class Cowboy extends Guy { String greet() { return "howdy "; } }  class Wrangler extends Cowboy { String greet() { return "ouch! "; } }  class Greetings2 {  public static void main(String [] args) {  Guy g = new Wrangler();  Guy g2 = new Cowboy();  Wrangler w2 = new Wrangler();  System.out.print(g.greet()+g2.greet()+w2.greet());  }  }  结果是什么?()A hi hi ouch!B hi howdy ouch!C ouch! howdy ouch!D 编译失败

考题 单选题In a married falls rig at the after end of a hatch,a boom is rigged in a fore and aft line through its heel.Stresses on the outboard guy will be LEAST if the guy is made fast at a point().A Abreast the heelB At right angles to the boom when viewed from aboveC Aft of the heelD Forward of the spiderband

考题 单选题In a married falls rig at the after end of a hatch , a boom is rigged in a fore and aft line through its heel . Stresses on the outboard guy will be least if the guy is made fast at a point().A abreast the heelB at right angles to the boom when viewed from aboveC aft of the heelD forward of the spiderband