You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
816 B

import java.util.Date;
public class article {
private String title;
private String content;
private String url;
private String author; // 新增
private Date publishDate; // 新增
// 构造器
public article(String title, String content, String url, String author, Date publishDate) {
this.title = title;
this.content = content;
this.url = url;
this.author = author;
this.publishDate = publishDate;
}
// Getters and Setters
public String getAuthor() { return author; }
public void setAuthor(String author) { this.author = author; }
public Date getPublishDate() { return publishDate; }
public void setPublishDate(Date publishDate) { this.publishDate = publishDate; }
// 原有字段的 getter/setter...
}