Question 1: Why is PreparedStatement preferred over Statement in real-world applications?
- It uses less memory
- It prevents SQL injection and improves performance
- It supports only SELECT queries
- It does not require connection
Explanation: PreparedStatement improves security and performance by precompiling SQL.