• 2021-04-14
    人们一般用“gender”来表示生理性别,或male或female
  • 内容

    • 0

      import java.io.*; class Person{ public void print(){System.out.print("Person ");} public void printMyGender(String s){ this.print(); System.out.print(s+" "); } } class Gender{ String type="gender"; public void print(Person p){p.printMyGender(type);} } class Female extends Gender{ public Female(){ type="female"; } } class Male extends Gender{ public Male(){ type="male"; } } class Employee extends Person{ public void print(){ System.out.print("Employee ");} } class Manager extends Employee{ public void print(){ System.out.print("Manager ");} } public class Test{ public static void main(String[] args){ Manager man = new Manager(); Employee em = new Employee(); Gender gender1 = new Male(); Gender gender2 = new Female(); gender1.print(man); gender2.print(em); } } 对于以上代码,其运行结果是

    • 1

      German has three _______but French only has two. A. genders B. gender C. male D. female

    • 2

      In The lottery,traditional _____ and ____ divisions are analyzed. A: Social/gender B: Male/female C: Rich/poor D: Smart/dumb

    • 3

      下面哪一条语句不正确: A: enum Gender{female, male}; B: struct Person{ char name[20]; Gender sex; C: Person father; D: };Person members[30];

    • 4

      Gender identity is similar with biological sex or sexual identity. 性别身份与生理性别或性身份相似。 A: 正确 B: 错误