+ 6
Someone plz for explaining me the 'Array Rank'?
arr.Rank
6 odpowiedzi
+ 4
thanks Tomer Sim.
Whats the difference beetween Rank and Legnth Array?
+ 3
Length is the amount of indexes which the array has.
if you call an array like that.
int[] arr = new int[8]
That means that the array has 8 indexes(0,1,2,3,4,5,6,7)
arr.length will return 8 in this case.
its commonly used in for loops where you have to do stuff with the array.
for example:
for(int x=0;x<arr.Length;x++) {<code> }
+ 2
Arr.Rank stands for- How much dimensions does the array have.
If its a one dimensional array then Arr.Rank = 1
If its a two dimensional array then Arr.Rank = 2
and so on...
for example:
double[][] arr = new double[10][3]
print(arr.Rank)
output:
2
+ 1
salut frére
0
Yup Assane Ndiaye comment vas?
0
oui cava bien aide moi a codé le tirage coupe du monde jusqu'au final
Par exemple le 1er page affiche une input et tu selectionne les équipes et ensuite dans les pages suivantes cocher les victoires jusqu'au final