• java第二次作业之一


    package dama;
    
    public class person
    {
         private String name;
         private String sex;
         private int age;
         private String IDCardNumber;
            
          public person(String name,String sex,int age,String IDCardNumber)
           {
               this.name=name;
               this.sex=sex;
               this.age=age;
               this.IDCardNumber=IDCardNumber;
            }
                         public void print()
                         {
              System.out.println("姓名:"+name);
              System.out.println("性别:"+sex);
              System.out.println("年龄:"+age);
              System.out.println("身份证号码:"+IDCardNumber);
            }
            public String getName()
            {
                return name;
            }
            public void setName(String name)
            {
                this.name=name;
            }
            public String getSex() 
            {
                return sex;
            }
            public void setSex(String sex)
            {
                this.sex = sex;
            }
            public int getAge() 
            {
               return age;
            }
            public void setAge(int age)
            {
               this.age = age;
            }
            public String getIDCardNumber()
            {
                return IDCardNumber;
            }
            public void setIDCardNumber(String IDCardNumber)
            {
                this.IDCardNumber = IDCardNumber;
            }
    
           public static void main(String[] args)
        {
        person p1=new person("张三","男",18,"4303333333333333335");
        person p2=new person("李四","女",19,"4303334444444444444");
        p1.print();
        p2.print();
        }
    
    }
  • 相关阅读:
    【ZJOI2017】树状数组
    【ZJOI2014】力
    【WC2017】挑战
    kube event 事件监控
    k8s nginx-ingress 504 timeout
    k8s 工具集
    jvm 性能调优工具之 jmap
    Elasticsearch unassigned 故障排查
    harbor API 与tag 清理
    前后端分离文档
  • 原文地址:https://www.cnblogs.com/quanzhilong/p/10723934.html
Copyright © 2020-2023  润新知