Okay, so I have this piece of code tested and I found there isn't any exception thrown out.
public static void main(String[] args) {
int[] list = {1,2};
if (list.length>2 && list[3] == 2){
System.out.println(list[1]);
}
}
Does the statement here
if (list.length>2 && list[3] == 2)
mean that if the first condition is false we don't even have to check the second condition?
Or it equals to
if (list.length>2){
if (list[3] == 2){
...
}
}
?
And, what if it is written in C or python or some other languages?
Thanks