SHARE
TWEET

1

Xrocky Dec 8th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package formalab.seance4.exercice1;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. public class Exercice1 {
  6.     public static void main(String[] args) {
  7.         //ArrayList
  8.         ArrayList<Integer> ListAges = new ArrayList <Integer>();
  9.         //add element dans le tableau
  10.         ListAges.add(20);
  11.         ListAges.add(21);
  12.         ListAges.add(22);
  13.         ListAges.add(23);
  14.         ListAges.add(24);
  15.         ListAges.add(25);
  16.        
  17.         //add 30 ba3d 22
  18.         ListAges.add(2,30);
  19.        
  20.        
  21.          //affichage taille de tableau methode
  22.         System.out.println("taille de la liste : "+ListAges.size());
  23.         //affichage de tableau array
  24.         System.out.println("ma liste "+ListAges);
  25.        
  26.        
  27.     }
  28.  
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top