3.2 premier

This commit is contained in:
Simon SAYE BABU 2023-10-05 12:29:10 +02:00
parent 1e3fad56ad
commit a7d3b4e407
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,22 @@
import java.util.ArrayList;
public class listes {
public static void main(String[] args)
{
ArrayList<Integer> l1 = new ArrayList<Integer>();
l1.add(1);
ArrayList<Float> l2 = new ArrayList<Float>();
l2.add(2.5654546f);
ArrayList<Number> l3 = new ArrayList<Number>();
l3.add(1);
l3.add(2.5654546f);
l3.add(646L);
l3.addAll(l2);
for (int i = 0; i < l3.size(); i++) {
System.out.println(l3.get(i));
}
}
}

View File

@ -0,0 +1,5 @@
public class tab {
public static void main(String[] args) {
}
}