0
What is the difference between these...
a) int[] arr; b) int[] arr=new int [x]; (where x can be any number) can't we do this, int[3] arr;. ?
4 Answers
0
With b) you can declare the size.
0
can't we just do this
int [x] arr;. ?
0
You can not do int[3] arr;
But you can do arr[3] = 2; (4th (0123=4) index of the array =2)
0
thanks