What is the difference between executeQuery () and executeUpdate()?
The difference between executeQuery and executeUpdate is that executeUpdate is for executing statements that change data in the database. For example, use executeUpdate to execute a CREATE an INSERT or an UPDATE statement. executeUpdate returns an int, and the value of that int corresponds to the number of records that were modified. While executeQuery() method is used for executing SQL statements and it returns ResultSet object.