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

📄 index.java

📁 j2me简单实例,j2me教程加源码,希望大家喜欢
💻 JAVA
字号:
package com.j2medev.chapter3;

import java.io.*;

/**
 *
 */
public class Index {
    
    public int id = 0;//存储数据记录的recordID
    public String key = "";//存储实际记录的主键

    public Index() {
    }
    
    public Index(int _id,String _key){
        this.id = _id;
        this.key = _key;
    }
    
    public void serialize(DataOutputStream dos) throws IOException{
        dos.writeInt(id);
        dos.writeUTF(key);
    }
    
    public static Index deserialize(DataInputStream dis) throws IOException{
        Index index = new Index();
        index.id = dis.readInt();
        index.key = dis.readUTF();
        return index;
    }
}

⌨️ 快捷键说明

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