0 votes
in JAVA by
Name 5 JDBC best practices your follow?

1 Answer

0 votes
by

Another good Java best practices for experienced Java developer of 7 to 8 years experience. Why it's important? because they are the ones which set the trend in the code and educate junior developers. There are many best practices and you can name as per your confort and conviniece. Here are some of the more common ones:

a) use batch statement for inserting and updating data.

b) use PreparedStatement to avoid SQL exception and better performance.

c) use database connection pool

d) access resultset using column name instead of column indexes.

e) Don't generate dynamic SQL by concatenating String with user input.

Related questions

0 votes
asked Oct 3, 2023 in Service Now by john ganales
0 votes
asked Feb 9, 2021 in JAVA by SakshiSharma
...