Created
May 19, 2012 17:51
-
-
Save RyanBreaker/2731693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Start | |
{ | |
public static void main(String args[]) | |
{ | |
int a[] = {3,4,5,6,7}; | |
change(a); | |
for(int i: a) | |
{ | |
System.out.println(a); | |
} | |
} | |
public static void change(int x[]) | |
{ | |
for(int i: x) | |
{ | |
x[i] += 5; | |
} | |
} | |
} | |
/*Exception Log | |
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 | |
at Start.change(Start.java:19) | |
at Start.main(Start.java:7) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment