I was writing a random piece of code and it is bothering me as to why the output is 100000000 in this case:
public class HelloWorld {
public static void main(String[] args) {
try {
int[] array = {1};
System.out.print(array[100000000]);
} catch (Exception e) {
System.out.print(e.getMessage());
}
}
}
Why does it print 100000000 and where can I read more about this behavior? Thank you.