Interviewer And Interviewee Guide

Sr.Java Web Developer Interview Question:

What is executeQuery(String query)?

Submitted by: Muhammad
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”.
Submitted by: Muhammad

Read Online Sr.Java Web Developer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.