我们尝试创建一个用于家庭人口普查的程序。为此,我们将编写一个包含 String name、boolean sex、int age、Human father 和 Human mother 字段的 Human 类。作为练习,我们将创建对象并向其填充数据,以便我们最终得到两个祖父、两个祖母、一个父亲、一个母亲和三个孩子。在屏幕上显示对象。
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.