Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pe.libreriavirtual.util;
- import java.sql.DriverManager;
- import java.sql.Connection;
- public class Conexion {
- public static Conexion conectar() {
- Conexion conexion = null;
- try {
- Class.forName("com.mysql.cj.jdbc.Driver");
- conexion = DriverManager.getConnection("jdbc:mysql://localhost:3306/semana01", "root", "admin");
- } catch (Exception e) {
- System.out.print(e.getMessage());
- }
- return conexion;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement