Code example for ObjectStreamField

0
	} 
	 
	private static class User implements Serializable {
		 
		private static final ObjectStreamField[] serialPersistentFields = {
			new ObjectStreamField("firstname", String.class)
		}; 
		 
		private final String firstname;
		private final String lastname;
		 
		User(String firstname, String lastname) {
			this.firstname = firstname;
			this.lastname = lastname;
		} 
 
		public String getFirstname() {
			return firstname;
		} 
 
		public String getLastname() {