... | ... | @@ -131,14 +131,14 @@ L'exemple ci-dessous illustre ces analogies et différences : |
|
|
|
|
|
```java
|
|
|
public static void main(String[] args) {
|
|
|
short[] shortArray;
|
|
|
shortArray = new short[3];
|
|
|
shortArray[0] = 3;
|
|
|
shortArray[1] = shortArray[0] * 2;
|
|
|
shortArray[2] = shortArray[1] - 1;
|
|
|
|
|
|
System.out.println(shortArray[0]);
|
|
|
System.out.println(shortArray.length);
|
|
|
int[] intArray;
|
|
|
intArray = new int[3];
|
|
|
intArray[0] = 3;
|
|
|
intArray[1] = intArray[0] * 2;
|
|
|
intArray[2] = intArray[1] - 1;
|
|
|
|
|
|
System.out.println(intArray[0]);
|
|
|
System.out.println(intArray.length);
|
|
|
}
|
|
|
```
|
|
|
|
... | ... | |