• 2022-06-08
    小惠定义了一个汽车类(Car),包含的属性有:颜色(color)、型号(type)、品牌(brand)。现在小强要在main( )方法中创建Car类的对象,在他的编码中,( )是正确的。
    A: Car myCar=new Car(); myCar color="黄色”;
    B: Car myCar=new Car(); myCar.brand="宝马";
    C: Car myCar; myCar.color="黄色";
    D: Car myCar=new Car(); color="黄色";
  • B

    内容

    • 0

      ▁a new car, he bought a color television

    • 1

      假设有一个类 Car ,则可以使用 dim c as new car 定义类的对象的语法格式( )。

    • 2

      The policewoman saw many things in the car EXCEPT _________. A: color TVs. B: boffles of Whisky C: a sewing machine D: a brand new walkman.

    • 3

      C#中Car为一自定义类,其中有以下方法定义public void Auto(){…}使用以下语句创建了该类的一个对象c1:Car c1=new Car();那么,调用Car的Auto方法为 A: c1.Auto() B: c1::Auto C: Car.Auto() D: Car::Auto()

    • 4

      I asked him how much__________. A: does his new car cost B: did his new car cost C: his new car costed D: his new car cost