:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Java Related >> Java J2EE >> Core Java


 Core Java interview questions  Core Java Interview Questions (1721)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (146)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
what is difference between excute query ()and execute update
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
# 1
execute query() returns a single resultset object.
exceute update() excecutes the insert, update and the delete
operation of the sql statement.This returns the integer
value or say the number of record affected by the SQL
statement execution.
Is This Answer Correct ?    13 Yes 1 No
# 2
execute query() used in select operation.
execute update() is used in delete, update and insert
Is This Answer Correct ?    9 Yes 1 No
# 3
executeQuery() is used to perform DDL operation like
(create,alter) while executeUpdate() is used to perform DML
operation like (insert/update/delete).
Is This Answer Correct ?    6 Yes 2 No
# 4
excuteQuery() its method used perform select query and
delete query return ResultSet object.
excuteUpdate() used to perform DML operation return type
Is This Answer Correct ?    5 Yes 1 No
# 5
Execute query():it is using for DML(Data definition
language) and DDL (Data Manipulation Language)and mainly its
used for select query
example:String sql="select * from Employee_Details";

Execute update():it is using for DML(Data definition
language) and DDL (Data Manipulation Language)and mainly its
used for insert query,update query,delete
example:String sql="insert into Employee_Detail........";

Is This Answer Correct ?    1 Yes 0 No
Megala Devi
# 6
executeQuery() method used for only selecting the records
and its return value is in the form of ResultSet Object.

executeUpdate() method used for DDL and DML commands and
its returns the int value.
Is This Answer Correct ?    0 Yes 0 No

Other Core Java Interview Questions
  Question Asked @ Answers
Why can't we make jsp as a controller and action servlet in struts? TCS 8
What is the difference between Synchronizing mehtod & Synchronizing block?   2
Explain different ways of passing arguments to sub-routine?   1
long d =10;int i =0;i=d; /// is this possible? If d is very long number (10 digits or some thing) then?   3
can you create interface instance ? Fidelity 54
What is the need to implement Serializable interface (with no methods) for objects which are to be serialized ? We can write our own functionality which writes objects to streams then why we need to implement and tell JVM that which objects can be serialized. iFlex 5
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites. iGate 2
What is "finally" keyword?   10
In what type of containers, Border layout is a default layout?   3
What is Session and cookies?Explain in detail with an example? CTS 4
How to set the Heap size in Java ? HCL 2
Can any one say how will sort map objects in java? TCS 2
For more Core Java Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright © 2013  All Rights Reserved.   ::