Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4797

Which is better for Dynamic querying String Builder or string buffer? [closed]

$
0
0

I am dynamically building SQL queries in Java using JDBC and need to determine the best approach for handling these queries efficiently.Currently, I am debating between using StringBuilder or StringBuffer for constructing the queries. I understand that StringBuffer is synchronized and thread-safe, while StringBuilder is not.

The application generates multiple queries based on user input.Queries might involve conditions, joins, and subqueries, so the query building process can be dynamic and complex.


Viewing all articles
Browse latest Browse all 4797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>