⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 electivebean.java

📁 用J2ME写的一个移动校园管理软件。我是看这个学习J2ME的。现在看来写得不是很好。
💻 JAVA
字号:
/**
 * 
 */
package cn.edu.nwpu.MobileCampusServer;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
/**
 * @author NickJava
 *
 */
public class ElectiveBean {
	private String electiveName;
	private int totalNum;
	private int currentNum;
	private String place;
	private String time;
	private String teacher;

	public int getCurrentNum() {
		return currentNum;
	}
	public void setCurrentNum(int currentNum) {
		this.currentNum = currentNum;
	}
	public String getElectiveName() {
		return electiveName;
	}
	public void setElectiveName(String elective) {
		this.electiveName = elective;
	}
	public String getPlace() {
		return place;
	}
	public void setPlace(String place) {
		this.place = place;
	}
	public String getTeacher() {
		return teacher;
	}
	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public int getTotalNum() {
		return totalNum;
	}
	public void setTotalNum(int totalNum) {
		this.totalNum = totalNum;
	}
	public void serialize(DataOutputStream dos)
    {
        try{
            dos.writeUTF(electiveName);
            dos.writeInt(totalNum);
            dos.writeInt(currentNum);
            dos.writeUTF(place);
            dos.writeUTF(time);
            dos.writeUTF(teacher);
        }catch(IOException ex){
            
        }
    }
    public static ElectiveBean deserialize(DataInputStream dis)
    {
    	ElectiveBean student = new ElectiveBean();
        try{
        	student.electiveName = dis.readUTF();
        	student.totalNum = dis.readInt();
        	student.currentNum = dis.readInt();
        	student.place = dis.readUTF();
        	student.time = dis.readUTF();
        	student.teacher = dis.readUTF();
        }catch(IOException ex){
            
        }
        return student;
        
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -