Question
Which statement about JDBC and Prepared Statements is the strongest interview answer?
- JDBC and Prepared Statements is mostly a naming style choice and has little effect on runtime or design.
- JDBC and Prepared Statements exists mainly to reduce the number of Java files in a project.
- JDBC and Prepared Statements matters only for frontend frameworks, not for core Java applications.
- Prepared statements separate SQL structure from user-supplied parameter values.
Hint
Start with the core rule behind JDBC and Prepared Statements.
Answer and rationale
Correct answer: D. Prepared statements separate SQL structure from user-supplied parameter values.
Prepared statements separate SQL structure from user-supplied parameter values. This is the base concept interviewers commonly test first.
Track: Java