Как избежать arrayIndexoutOfBounds в JavaJAVA

Программисты JAVA общаются здесь
Anonymous
Как избежать arrayIndexoutOfBounds в Java

Сообщение Anonymous »

public class Test {
public static void main(String[] args) {
int arr[] = {1,2,3,4};

int i=0;
while (i

Что мы должны писать вместо? так что ArrayIndexoutofBounds < /code> Исключение не происходит, и вывод выглядит следующим образом? < /p>

1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4


Подробнее здесь: https://stackoverflow.com/questions/265 ... ds-in-java

Вернуться в «JAVA»