• 8


    造人

    package wewe;

    public class A {
      public int id;
      public String name;
      public int age;
      public String city;
      public String introduce() {
        return "My id=" + id + ", name=" + name + ", age=" + age + ", city=" + city ;
      }

    }

    package wewe;

    public class B {
      public static void main(String[] args) {
        A p1=new A();
        A p2=new A();
        A p3=new A();
        A p4=new A();
        p1.id=110001;
        p1.name="刘备";
        p1.age=43;
        p1.city="蜀国";
        p2.id=110002;
        p2.name="关羽";
        p2.age=35;
        p2.city="蜀国";
        p3.id=110003;
        p3.name="张飞";
        p3.age=32;
        p3.city="蜀国";
        p4.id=110004;
        p4.name="诸葛亮";
        p4.age=25;
        p4.city="蜀国";
        System.out.println(p1.introduce());
        System.out.println(p2.introduce());
        System.out.println(p3.introduce());
        System.out.println(p4.introduce());

      }

    }

     

  • 相关阅读:
    GPU
    Windows系统之hosts文件
    条形码定位算法
    entity framework extended library , bulk execute,deleting and updating ,opensource
    sharepoint 2013 sp1
    windows azure programing
    windows azure tools for mac
    online web design tool
    toastr
    sharepoint online
  • 原文地址:https://www.cnblogs.com/stenber/p/7787279.html
Copyright © 2020-2023  润新知