This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
"Many database systems have a mechanism that automatically generates a unique key field when a row is inserted. The method Statement.getGeneratedKeys,
which can be called to retrieve the value of such a key, returns a ResultSet object with a column for each automatically generated key. A flag indicating that any auto generated columns should be returned is passed to the methods execute, executeUpdate or prepareStatement when the statement is executed or prepared. [...]"
Oracle doesn't have a data type equivalent to Access's autonumber or MySQL's auto increment, so there is nothing for the driver to use. With Oracle you need to use a sequence and select the next PK explicitly before using it. If you wanted to use the getGeneratedKeys() stuff you'd need a way of telling the Statement which sequence you were using for the particular table you are inserting into.