15 lines
326 B
Java
15 lines
326 B
Java
|
import java.util.ArrayList;
|
||
|
|
||
|
public class GenericiteSoustypageExempleTableau {
|
||
|
|
||
|
public static void main(String[] args) {
|
||
|
String[] ts = new String[2];
|
||
|
Object[] to = ts;
|
||
|
to[0] = "texte";
|
||
|
to[1] = 15.5;
|
||
|
System.out.println("premier élément : " + to[0]);
|
||
|
System.out.println("deuxième élément : " + to[1]);
|
||
|
}
|
||
|
|
||
|
}
|