public class BenParcelable implements Parcelable {
public String name;
public int age;
public String profession;
public BenParcelable(String name, int age, String profession) { this.name = name; this.age = age; this.profession = profession; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public int getAge() { return age; }
public void setAge(int age) { this.age = age; }
public String getprofession() { return profession; }
public void setprofession(String profession) { this.profession = profession; }
@Override public int describeContents() { return 0; }
@Override public void writeToParcel(Parcel parcel, int flag) { parcel.writeString(name); parcel.writeInt(age); parcel.writeString(profession); }
public static final Creator<BenParcelable> CREATOR = new Creator<BenParcelable>() { public BenParcelable createFromParcel(Parcel in) { return new BenParcelable(in); }
public BenParcelable[] newArray(int size) { return new BenParcelable[size]; } };
private BenParcelable(Parcel in) { name = in.readString(); age = in.readInt(); profession = in.readString(); } }