List<String> sampleList1 = new ArrayList<String>();
System.out.println(sampleList1);
System.out.println(sampleList1.size());
List<String> sampleList2;
//System.out.println(sampleList2);← Erreur de compilation selon laquelle la variable locale sampleList2 n'a peut-être pas été initialisée
List<String> sampleList3 = new ArrayList<String>();
sampleList3.add("");
System.out.println(sampleList3);
System.out.println(sampleList3.size());
Recommended Posts