+ 1

Arrays: Using charAt() with Integers (something like intAt())

Heyya! ^^ I need something like intAt() in an array. int[] array; for(int x = 0; x<array.length(); x++) { int currentValue = array.intAt(x); } That is something I would like to achieve ^^

8th Jan 2019, 5:17 PM
Gino ^^
Gino ^^ - avatar
5 ответов
+ 2
In arrays you don't need any intAt() or charAt() functios. You can simply use int currentValue = array[x]; to get element of the array at x index. However note, you did not initialize your array and put values in it so you will get error.
8th Jan 2019, 5:41 PM
Asirap