public class Test { public static void main(String args []) { Test test = new Test(); test.go(); } private void go() { long personId = 0; try { // Create a new person Person person = new Person(); // Create a new empy Person person.setFirstName("John"); // set the first name person.setLastName("Smith"); // set the last name personId = person.store(); // Insert the row to the table // Print out the details of this person Person person2 = new Person(personId); System.out.println("First Name = " + person2.getFirstName() ); System.out.println("Last Name = " + person2.getLastName() ); //Change the person first name and update the table with it Person person3 = new Person(personId); // Get the existing person person3.setFirstName("Jane"); // change the first name person3.store(); // Update the person table } catch (Exception exp) { System.out.println("Exception: " + exp); } } }