|> groovy -e "println ( 'ab'[4] )"
Caught: java.lang.StringIndexOutOfBoundsException: String index out of range: 5
at script_from_command_line.$cs$2(script_from_command_line)
at script_from_command_line.run(script_from_command_line:1)
at script_from_command_line.main(script_from_command_line)
Even more confusing:
// this produces: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 bar.substring(3,2));