in Education by
Which of the following is advantage of using PreparedStatement in Java? (a) Slow performance (b) Encourages SQL injection (c) Prevents SQL injection (d) More memory usage I got this question by my school principal while I was bunking the class. My question is taken from JDBC in division Java Beans & JDBC of Java Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Correct choice is (c) Prevents SQL injection Easiest explanation: PreparedStatement in Java improves performance and also prevents from SQL injection.

Related questions

0 votes
    Which of the following is advantage of using JDBC connection pool? (a) Slow performance (b) Using more memory (c) ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is not true about Java beans? (a) Implements java.io.Serializable interface (b) Extends java. ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Java Beans are extremely secured? (a) True (b) False I got this question in unit test. Question is taken from ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    What is the attribute of java bean to specify scope of bean to have single instance per Spring IOC? (a) prototype ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is not an Enterprise Beans type? (a) Doubleton (b) Singleton (c) Stateful (d) Stateless ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is correct error when loading JAR file with duplicate name? (a) java.io.NullPointerException ( ... JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is not a feature of Beans? (a) Introspection (b) Events (c) Persistence (d) Serialization ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following contains both date and time? (a) java.io.date (b) java.sql.date (c) java.util.date ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which one of the following contains date information? (a) java.sql.TimeStamp (b) java.sql.Time (c) java.io. ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is used to call stored procedure? (a) Statement (b) PreparedStatement (c) CallableStatment (d ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is used to limit the number of rows returned? (a) setMaxRows(int i) (b) setMinRows(int ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is method of JDBC batch process? (a) setBatch() (b) deleteBatch() (c) removeBatch() (d ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is used to rollback a JDBC transaction? (a) rollback() (b) rollforward() (c) ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which file separator should be used by MANIFEST file? (a) / (b) \ (c) - (d) // The question was asked ... Java Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which attribute is used to specify initialization method? (a) init (b) init-method (c) initialization (d) ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
...