下列类定义代码,当用来声明对象car,并用Carcar=newCar();实例化后,可以通过car对象直接赋值的字段是( )。
publicclassCar
{
public string type;
string No;
private int heavy;
double speed;
protected string owner;
public string price;
private string color;
}
Atype No
Bheavy owner
Ctype owner price
Dtype price
相关试题
-
下列类定义代码,当用来声明对象car,并用Carcar=newCar();实例化后,可以通过car对象直接赋值的字段是( )。 publicclassCar { public string t
-
在下面的类声明中,属于私有字段的是( ) classPerson { public string name; public string sex; private int age; pr
-
下列程序的运行结果是: public class test{ private String[] data={10,10.5}; public void fun(){ double s=
-
现有Student类,构造函数对其属性Name进行赋值操作,请在下划线处填充正确代码。class Student { private string name;
-
在C#中,下列代码描述正确的是:() class UserInfo { private string userNo; private string userPwd;