title: oracle with JDBC delete account funtion
body: <p>I am trying to create a method that deletes a user account from an Oracle database but whenever the code <code>ps.executeUpdate() &gt; 0</code> executes the program does not return anything or terminate. I tried the query straight into the database and it worked. any ideas why?</p>
  
  <pre><code>public boolean deleteAccount(int account_ID) {
  
       try {
           System.out.println("This is read");
           Connection conn = Jdbcconnection.getConnection();
           String sql = "DELETE FROM ACCOUNTS where account_ID = ?"; 
  
           System.out.println("This is read");            
  
           PreparedStatement ps = conn.prepareStatement(sql);
           ps.setInt(1, account_ID);
  
           System.out.println("This is read");   
  
           return ps.executeUpdate() &gt; 0;
  
      } catch(SQLException e) {
           e.printStackTrace(); 
      }
      return false;
  }
  </code></pre>