---
title: "What is the difference between Statement and PreparedStatement interface?"  
description: "What is the difference between Statement and PreparedStatement interface?"  
author: "Anonymous User"  
published: 2015-05-15  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/2536/what-is-the-difference-between-statement-and-preparedstatement-interface  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is the difference between Statement and PreparedStatement interface?

In case of Statement, query is complied each time whereas in case of PreparedStatement, query is complied only once. So performance of PreparedStatement is better than Statement.

## Answers

### Answer by Anonymous User

In case of Statement, query is complied each time whereas in case of PreparedStatement, query is complied only once. So performance of PreparedStatement is better than Statement.


---

Original Source: https://www.mindstick.com/interview/2536/what-is-the-difference-between-statement-and-preparedstatement-interface

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
