title: java.sql.Statement.executeQuery(String sql) throws SQLException when DELETE sql query is used
body: <p>I know that to execute sql DELETE statement, I need to use executeUpdate(). However my need is to support only SELECT statment, hence I am using executeQuery(String sql).
  My db is Oracle.</p>
  
  <p>My problem is, I am using java.sql.Statement.executeQuery(String sql) in a desktop based application, a textbox in our app accepts any kind of query and while testing we found that executeQuery(sql) is actually executing a DELETE query, i.e it is successfully deleting a record and then throwing error -SQLException.</p>
  
  <ol>
  <li>Shouldn't the api not allow DELETE query to be executed ?. </li>
  <li>What can be done to prevent DELETE query to be executed by Statement.executeQuery api ?</li>
  </ol>