zoukankan      html  css  js  c++  java
  • 10.29第七次

    package zy;
    public class K {
    
          public int id;
          public String name;
          public int age;
          public String city;
    public String introduce() { return + id + ": 姓名 " + name + ", 年龄" + age + ", 地址" + city ; } }
    复制代码
     public class Zaoren {
     
     public static void main(String[] args) {
          K p1=new K();
          K p2=new K();
          K p3=new K();
          K p4=new K();
    p1.id=100000; p1.name="A1"; p1.age=19; p1.city="上海"; p2.id=200000; p2.name="A2"; p2.age=18; p2.city="北京"; p3.id=300000; p3.name="A3"; p3.age=19; p3.city="深圳"; p4.id=400000; p4.name="A4"; p4.age=19; p4.city="广州"; System.out.println(p1.introduce()); System.out.println(p2.introduce()); System.out.println(p3.introduce()); System.out.println(p4.introduce()); }
    }

  • 相关阅读:
    UVa 106
    UVa 111
    UVa 105
    UVa 104
    UVa 103
    UVa 102
    UVa 101
    UVa 100
    就决定是你了!
    阿姆斯特朗回旋加速喷气式阿姆斯特朗炮
  • 原文地址:https://www.cnblogs.com/kongtingting/p/7792800.html
Copyright © 2011-2022 走看看