+ 1
What is the point of arrLength?
4 Réponses
+ 3
To get the size of the array.
+ 3
an example would be if you needed to output all elements of the array.
String[] arr = {"A","B","C"}
for (int i=0;i < arr.length;i++) {
System.out.println(i);
}
+ 2
thank you! that helped. sorry for the delayed reply
+ 1
could you give me an example? if we are trying in the size of it then why do we need to get the size of it?