A sample bean class is presented below. Things to note are:

- It implements java.io.Serializable interface
- It provides getters and setters for the properties

Java Code:
public class SimpleBean implements java.io.Serializable {

	/* Properties */
	private String name = null;
	private int age = 0;

	/* Empty Constructor */
	public SimpleBean() {}

	/* Getter and Setter Methods */
	public String getName() {
		return name;
	}

	public void setName(String s) {
		name = s;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int i) {
		age = i;
	}
}