Quick, shallow Java question: parentheses around SQLException

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

      

What does the surrounding sqle

parenthesis do? Anything?

Just curious.

+1


source to share


1 answer


The quick answer is nothing.

Longer answer. It could be a rudimentary remnant of an inline casting:



((SomeMoreSpecificException)sqle).get...

      

+6


source







All Articles