1.

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 usageI 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

Answer»

Correct CHOICE is (C) Prevents SQL injection

Easiest EXPLANATION: PreparedStatement in Java improves performance and ALSO prevents from SQL injection.



Discussion

No Comment Found

Related InterviewSolutions