I got error message:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
With this code:
public class probno {
public static void main(String arghs[]) {
int niz[]={3,2,5,6,8};
promjena(niz);
for(int y:niz){
System.out.println(y);
}
}
public static void promjena (int x[]){
for (int brojac=0;brojac<=x.length;brojac++){
x[brojac]+=5;
}
}
}