package com.hanqi;
public class shuiGuo {
private String color;
private double price;
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;
}
private double weight;
}
abstract class test05 {
public static void main(String[] args) {
People per=new People();
per.setAge(20);
per.setName("张三");
per.setSex("男");
System.out.println(per.getAge());
System.out.println(per.getName());
System.out.println(per.getSex());
}
}
时间: 2024-10-26 08:46:48