标签:[] print hit src pre int mic main 空间
package android.java.oop09; // 描述Person对象 public class Person { private String name; private int age; private double height; private static String country = "中国"; private Person() {} public Person(String name, int age, double height) { this.name = name; this.age = age; this.height = height; } public void showValue() { System.out.println("name:" + name + " age:" + age + " height:" + height + " country:" + country); } }
package android.java.oop09; public class Demo01 { public static void main(String[] args) { Person person1 = new Person("李双贱", 30, 17.0); person1.showValue(); Person person2 = new Person("李双2B", 32, 16.0); person2.showValue(); Person person3 = new Person("李双SB", 31, 17.0); person3.showValue(); Person person4 = new Person("李双shit", 33, 16.0); person4.showValue(); Person person5 = new Person("李双38", 32, 17.0); person5.showValue(); Person person6 = new Person("李双骗子", 99, 16.0); person6.showValue(); Person person7 = new Person("李双女骗子", 99, 17.0); person7.showValue(); Person person8 = new Person("李双骚", 99, 17.0); person8.showValue(); // .... } }
标签:[] print hit src pre int mic main 空间
原文地址:https://www.cnblogs.com/android-deli/p/10351246.html