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:
Import java.io.Serializable
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
精彩评论