When calling a database in Java, do you know where the calling program is written? Do you know how it is connected? The editor below will take you to find out together.
#JavaSQL connection code is generally written in Java. You can write it in a Java tool class (created by yourself) or in a configuration file.
Java and SQL databases are connected through jdbc.
What is jdbc?
JDBC (Java DataBase Connectivity, java database connection) is a Java API used to execute SQL statements. It can provide unified access to a variety of relational databases. It consists of a set of classes and interfaces written in the Java language composition.
The above is the detailed content of Where is the code to connect java to sql database generally written?. For more information, please follow other related articles on the PHP Chinese website!