Sr.Java Web Developer Question: Download Sr.Java Web Developer PDF

What is executeQuery(String query)?

Tweet Share WhatsApp

Answer:

Statement executeQuery(String query) is used to execute Select queries and returns the ResultSet. ResultSet returned is never null even if there are no records matching the query. When executing select queries we should use executeQuery method so that if someone tries to execute insert/update statement it will throw java.sql.SQLException with message “executeQuery method can not be used for update”.

Download Sr.Java Web Developer PDF Read All 64 Sr.Java Web Developer Questions
Previous QuestionNext Question
Do you know what is composition in Java?Do you know what is JSON? Can you represent JSON as Java Object?