Wie man ArrayIndexoutofunds in Java vermeidetJava

Java-Forum
Anonymous
 Wie man ArrayIndexoutofunds in Java vermeidet

Post by Anonymous »

Code: Select all

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

int i=0;
while (i

Was sollen wir anstelle von anstelle? so dass ArrayIndexoutOfBounds < /code> Ausnahme nicht auftritt und die Ausgabe wie folgt ist? < /p>

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

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post