Skip to content
Advertisement

Difference between javax.sql and java.sql?

What is the difference between javax.sql and java.sql
I understand that javax.sql is for JavaEE. or am I wrong.

I am struggling with understanding this difference.
And their usage scenarios.

Advertisement

Answer

What is the difference between javax.sql and java.sql I understand that javax.sql is for JavaEE.

It used to be that javax.sql was for JDBC extensions that were in Java EE and not Java SE, but this changed as of JDBC 3.

Now both packages are part of JDBC in Java SE, and the fact that there are two packages is now just a historical anomaly. The two packages continue to exist because removing one would cause backwards compatibility problems.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement