An error is reported about import Java. SQL. *; problem

Many people always have this problem during package guide when learning java to connect to MySQL database

The package java.sql is not accessible

This problem is a problem with the Java version. Since java9, Java has become modular. You need to declare the use of the module package in the module file, otherwise you can’t find the class.

In   Add requires java.sql; Just

  So the problem is solved

Read More: