iifast

Untitled

Feb 11th, 2020
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. // ... /test/Test.java
  2.  
  3. package com.esprit.test;
  4.  
  5. import com.esprit.Entite.Personne;
  6. import com.esprit.Service.ServicePersonne;
  7. import com.esprit.Utils.DataBase;
  8. import java.sql.*;
  9. import java.util.List;
  10. import java.util.logging.Level;
  11. import java.util.logging.Logger;
  12.  
  13. /**
  14.  * @author Esprit
  15.  */
  16. public class Test {
  17.    
  18.     public static void main(String[] args) {
  19.         ServicePersonne ser = new ServicePersonne();
  20.        
  21.         Personne p1 = new Personne("hammadi", "jbeli", 10);
  22.         Personne p2 = new Personne("Bajbouj", "Sebsi", 10);
  23.        
  24.         try {      
  25.             ser.ajouter1(p2);
  26.             ser.ajouter(p1);
  27.             List<Personne> list = ser.readAll();
  28.             System.out.println(list);
  29.             } catch (SQLException ex) {      System.out.println(ex);    }
  30.     }
  31.    
  32. }
Advertisement
Add Comment
Please, Sign In to add comment