June 2018
Intermediate to advanced
280 pages
7h 46m
English
We have talked about streams and collections so far. There are a few additions to arrays as well:
jshell> int[] arr1={1,2,3,4}arr1 ==> int[4] { 1, 2, 3, 4 }jshell> Arrays.mismatch(arr1, new int[]{1,2})$14 ==> 2jshell> Arrays.mismatch(arr1, new int[]{1,2,3,4})$15 ==> -1
We created an integer array. The first comparison shows that the array mismatched at index 2. The second comparison shows that both arrays are the same.
jshell> int[] ...
Read now
Unlock full access