A ROWID is an identification tag unique for each row of an Oracle Database table. The ROWID can be thought of as a virtual column, containing the ID for each row.
The oracle.sql.ROWID class is supplied as a container for ROWID SQL data type.
ResultSet rst = stmt.executeQuery("select rowid,name from friend"); ... String rowid=rst.getString(1); ... //or RowId rowid = rst.getRowId(1); // Get the ROWID as a String