package bi.didi.code; import java.sql.*; public class Main { public static void main(String[] args) { try { String matri = "20/636"; String nom = "distaryyui"; String prenom = "dhkfgpdfud"; int age = 28; float note = 25; Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/gestionetudiant","root",""); String sql = "INSERT INTO etudiant VALUES(?,?,?,?,?)"; PreparedStatement stmt = con.prepareStatement(sql); stmt.setString(1,matri); stmt.setString(2,nom); stmt.setString(3,prenom); stmt.setInt(4,age); stmt.setFloat(5,note); stmt.executeUpdate(); System.out.println("hey"); } catch (Exception e) { // TODO: handle exception }// TODO Auto-generated method stub } }