📄 newsvo.java
字号:
package cn.com.studentsystem.classnews;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import cn.com.studentsystem.log.Log;
public class NewsVo {
private String datetime ;//时间
private String title;//标题
private String author;//作者
public NewsVo( String datetime, String title,String author) {
File file = new File("logdiary.txt");
PrintWriter pw = null;
try {
pw = new PrintWriter(new FileWriter(file,true),true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Log.log("NewsVo", pw, "产生了一个消息类的值对象");
this.author = author;
this.datetime = datetime;
this.title = title;
}
public String getDatetime() {
return datetime;
}
public void setDatetime(String datetime) {
this.datetime = datetime;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -