0
I need someone who can explain java arrays for me
I need help
2 Answers
+ 1
So first of all Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.
For example
int arr[]={33,3,4,5}; Â
String [] color ={"red "," blue"," red" };
System.out.printIn(color[0]);
Now when you start counting elements in an array you should count from zero so this code will print red .
There another way to make an array which is like this
Int c [] = new int[5];
c[0]=1;
I hope it helps