开发者

How to save and read user information (username ,password,and so on) by serializable?

Is write all User information to o开发者_运维问答nly a file ,or every user has a self file ? And how to write information or read information of someone?


Here's a step-by-step guide to basic serializaiton in java:

  1. Import java.io.Serializable

  2. List item

Get your data-containing class to implement Serializable.

    public class MyClass implements Serializable {

3. Use an Object I/O stream to read/write your objects from files.

Here is a great concise tutorial: http://www.javabeginner.com/uncategorized/java-serialization

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜