newsvo.java

来自「培训时做的学生管理系统.基于J2SE平台开发」· Java 代码 · 共 61 行

JAVA
61
字号
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 + =
减小字号Ctrl + -
显示快捷键?