class Test{
public static int[ ] getArray() { return null; }
public static void main
( String[] args
){ int index = 1;
try{
getArray()[ index = 3]++; //the value of index is reassigned
}
catch (Exception e
){ System.
out.
println("Really?"); } //catch isn't executed since no exception is thrown System.
out.
println(" index = " + index
); }
}
Y2xhc3MgVGVzdHsKICAgIHB1YmxpYyBzdGF0aWMgaW50WyBdIGdldEFycmF5KCkgeyByZXR1cm4gbnVsbDsgfSAKICAgIAoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oIFN0cmluZ1tdIGFyZ3MpewogICAgICAgIGludCBpbmRleCA9IDE7CiAgICAgICAgdHJ5ewogICAgICAgICAgICBnZXRBcnJheSgpWyBpbmRleCA9IDNdKys7IC8vdGhlIHZhbHVlIG9mIGluZGV4IGlzIHJlYXNzaWduZWQgCiAgICAgICAgfQogICAgICAgIGNhdGNoIChFeGNlcHRpb24gZSl7IFN5c3RlbS5vdXQucHJpbnRsbigiUmVhbGx5PyIpOyB9IC8vY2F0Y2ggaXNuJ3QgZXhlY3V0ZWQgc2luY2Ugbm8gZXhjZXB0aW9uIGlzIHRocm93bgogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiIGluZGV4ID0gIiArIGluZGV4KTsKICAgIH0KfQ==