• 10.25:造人


    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());

      }

    }

  • 相关阅读:
    MVC架构引入smarty视图引擎
    视图引擎smarty之插件
    视图引擎smarty 三
    视图引擎smarty 二
    视图引擎smarty 一
    .Net 框架
    onkeyup="this.value=this.value.replace(/D/g,'')
    cookie
    click
    html页面内容替换
  • 原文地址:https://www.cnblogs.com/linfenglf/p/7754427.html
Copyright © 2020-2023  润新知