A: A.Type student ID As String * 20 name As String * 10 age As Integer End student
B: B.Type student ID As String * 20 name As String * 10 age As Integer End Type
C: C.Type student ID As String name As String age As Integer End student
D: C.Type ID As String * 20 name As String * 10 age As Integer End Type student
举一反三
- 在窗体的通用声明段自定义了数据类型Students,下列____定义方式是正确的。 A: Public Type Students Name As String *10 StudNo As Integer End Type B: Type Students Dim Name As String *10 Dim StudNo As Integer End Students C: Type Students Name String *10 StudNo Integer End Type D: Private Type Students Name As String *10 StudNo As Integer End Type
- 以下能正确定义数据类型TelBook的代码是:____。 A: Type TelBook<br/>Dim Name As String * 10<br/>Dim TelNum As Integer End Type B: Type TelBook<br/>Name As String * 10<br/>TelNum As Integer End Type C: Type TelBook<br/>Name As String * 10<br/>TelNum As Integer End TelBook D: Type TelBook<br/>Name As String * 10<br/>TelNum As Integer End Type TelBook
- 以下能正确定义数据类型TelBook的代码是______。 A: A) Type TelBook B: Name As String*10 C: TelNum As Integer D: End Type E: B) Type TelBook F: Name As String*10 G: TelNum AS Integer H: End TelBook I: C) Type TelBook J: Name String*10 K: TelNum Integer L: End Type TelBook M: D) Typedef TelBook N: NameString*10 O: TelNum Integer P: EndType
- Student类中存在String类型name属性,下列Student类的构造方法中,哪个是正确的? A: Student(String name){} B: Student(String name) C: Student(name)() D: NewStudent (String name){}
- 【填空题】阅读程序写结果 public class Student { private static int sid = 0; private String name; int id; Student(String name) { this.name = name; id = sid++; } public void info() { System.out.println("My name is "+name+" No."+id); } public static void infoSta() { System.out.println(sid); } public static void main(String arg[]) { Student.sid = 100; Student st1 = new Student("huahua"); st1.sid = 2000; Student st2 = new Student("meimei"); st1.info(); st2.info(); } }
内容
- 0
以下能正确定义数据类型TelBook的代码是: A: Type TelBook Dim Name As String * 10 Dim TelNum As IntegerEnd Type B: Type TelBook Name As String * 10 TelNum As IntegerEnd Type C: Type TelBook Name As String * 10 TelNum As IntegerEnd TelBook D: Type TelBook Name As String * 10 TelNum As IntegerEnd Type TelBook
- 1
下列( )方法定义和调用的代码是正确的。 A: static void Introduce(string gender = "男", string name, int age = 18){} Introduce(name: "alex", age: 20); B: static void Introduce(string name, int age = 18, string gender = "男"){} Introduce(age: 20, name: "alex"); C: static void Introduce(string gender = "男", string name, int ago = 18){} Introduce(age: 20, name: "alex"); D: static void Introduce(string name, int age = 18, string gender = "男"){}Introduce(name: "alex", age: 20);
- 2
下面程序运行的结果是 struct Student { public int age; public string name; public Student(int age, string name) { this.age = age; this.name = name; } } class Program { static void Main(string[] args) { Student stu1 = new Student(18, "小方"); Student stu2 = new Student(24, "小刚"); stu2 = stu1; stu1.age = 30; stu1.name = "小燕"; Console.WriteLine("{1},{0}",stu2.age,stu2.name); } }
- 3
已知函数getStudent()定义为public Student getStudent(int ID),下列四个选项中可以与getStudent构成重载的方法是 A: private Student getStudent(int ID) B: public String getStudent(int ID) C: Student getStudent(String name) D: public Student get(int ID)
- 4
在窗体的通用声明段自定义了数据类型Students,下列_____定义方式是正确的。 A: TypeStudents Name String*10 Studno IntegerEnd Type B: Private Type Students Name AsString*10 Studno AsInteger End Type C: Type Students Name AsString*10 Studno AsIntegerEnd Students D: Type Students Name As String*10 Studno AsIntegerEnd Type