Question

  try {
      ...
  }  catch (SQLException sqle) {
      String theError = (sqle).getSQLState();
      ...
  }

What does surrounding sqle with parenthesis do? Anything?

Just curious.

Was it helpful?

Solution

Quick reply - Nothing.

Longer reply - It might be a vestigial remnant of an inline cast:

((SomeMoreSpecificException)sqle).get...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top