No, a SELECT statement should return the data as they exist in the database. Of course, there is still a possibility of a bug in the JDBC driver, but...
What I still think is that you're looking at another table which is empty, but in
Java selecting from a different table which contains data. Are you using the same user in the JDBC code and whatever tool you use to look in the database? Couldn't there be a synonym, view or other thing which would cause the tables to be mixed up?
Besides, the table probably contains fields other than ID. Did you try to print out these? If they contain meaningful texts (names, for example), the table is probably real - it would be highly unlikely that a bug in a JDBC driver would cause some meaningful names and texts to appear out of nowhere.