public class Land{
public static void main(String args[]){
//代码1
Village.setWaterAmount(200);
int leftWater= Village.waterAmount;//代码2
System.out.println("水井中有"+leftWater+"升水");
Village zhaoZhuang,maJiaHeZhi;
zhaoZhuang=new Village("赵庄");
maJiaHeZhi=new Village("马家河子");
zhaoZhuang.setPeopleNumber(80);
maJiaHeZhi.setPeopleNumber(120);
int peopleNumber=zhaoZhuang.getPeopleNumber();
System.out.println("赵家庄的人口:"+peopleNumber);
peopleNumber=maJiaHeZhi.getPeopleNumber();
System.out.println("马家河子的人口:"+peopleNumber);
//代码3
zhaoZhuang.drinkWater(50);
leftWater=maJiaHeZhi.lookWaterAmount();
String name=maJiaHeZhi.name;
System.out.println(name+"发现水中有"+leftWater+"升水");
}
}