Taken as a whole, I read the javadoc to be saying that if the connection is not valid (meaning not closed and usable), or if the timeout is exceeded it will return false.
If however, something else goes wrong with the query to the database about the validity of the connection, an SQLException may still be thrown. (Say for example, the query is against a required system table of the database that is missing, or the transaction is rolled back in the middle of checking).
An SQLException will always be thrown if the timeout value is less than zero.
That being said, there a ton of problems with (JDBC in general and) this spec in particular.
What defines an invalid connection? If a database error is thrown trying to find out, can we really say that we don't know if the connection is valid. It is likely broken anyway. The only thing I can think of is that the connection still needs to be closed whereas valid == false might mean that the connection is dead, no need to close it. This leads to the next problem:
Valid is not formally defined. It means not closed and something else. But that something else is kind of vague. It should mean usable, but what if it is not closed, but not usable?
And finally, why be so intolerant of a negative number? It is just as easy to say: A value of 0 or less indicates a timeout is not applied to the database operation.
And of course the spec on isClosed() wasn't updated to recognize the new isValid(int) method.
The JDBC API truly is a travesty in general.
On the other hand if the meaning is if and only if, it should have said that, and if SQLException cannot be thrown for any other reason, then this should be a runtime exception (IllegalArgumentException for example), because passing a negative value would just be a programming error. If, on the other hand, SQLException can be thrown for other reasons, then at least it is arguable that it wasn't worth introducing a separate exception when the checked exception had to be handled anyway. I'm not sure I agree with the argument, but at least it may have merit. (Note, I'm not writing that last paragraph as evidence that the spec doesn't mean if and only if, but rather as a further criticism if that is what it means.)