your code should compile successfully but throw a "Array Index Out of
Bound" Exception...
Why? Because, in this line: System.out.println(ages[j]);
you are trying to access array(ages) at index j(i.e. 100 as int j=100)
which does not exist. Array size is 10, so valid indexes are between
0-9.

Did this help you get the problem, if not feel free to contact us again.

Regards Sahil Bhatia.

-- 
To post to this group, send email to javaprogrammingwithpassion@googlegroups.com
To unsubscribe from this group, send email to 
javaprogrammingwithpassion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to