测试博客内容:
public class OneDayWeatherInf {
//这是一个变量
String location;
String date;
String week;
String tempertureOfDay;
String tempertureNow;
String wind;
String weather;
String picture;
int pmTwoPointFive;
public OneDayWeatherInf(){
location = "";
date = "";
week = "";
tempertureOfDay = "";
tempertureNow = "";
wind = "";
weather = "";
picture = "undefined";
pmTwoPointFive = 0;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getWeek() {
return week;
}
public void setWeek(String week) {
this.week = week;
}
public String getTempertureOfDay() {
return tempertureOfDay;
}
public void setTempertureOfDay(String tempertureOfDay) {
this.tempertureOfDay = tempertureOfDay;
}
public String getTempertureNow() {
return tempertureNow;
}
public void setTempertureNow(String tempertureNow) {
this.tempertureNow = tempertureNow;
}
public String getWind() {
return wind;
}
public void setWind(String wind) {
this.wind = wind;
}
public String getWeather() {
return weather;
}
public void setWeather(String weather) {
this.weather = weather;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public int getPmTwoPointFive() {
return pmTwoPointFive;
}
public void setPmTwoPointFive(int pmTwoPointFive) {
this.pmTwoPointFive = pmTwoPointFive;
}
public String toString(){
return location+" "+date+" "+week+" tempertureOfDay: "+tempertureOfDay+" tempertureNow: "+tempertureNow+" "+wind+" "+weather+" "+picture+" "+pmTwoPointFive;
}
}
本文介绍了一个用于存储和管理一天中天气信息的Java类。该类包括位置、日期、温度等属性,并提供了获取和设置这些属性的方法。此外,还提供了一个toString()方法用于输出对象的所有信息。
3152

被折叠的 条评论
为什么被折叠?



