Ok, regarding last post:
1. list[long] would not fail as such,but "listIdx" String cannot be coerced to Long, there would be an exception at parsing time.
2. listIdx is a String = "2" and that value of String is parsed niceley, becoming Long=2 so it can be used.
Hope that helps, I'm having a go at OCPJWCD on Wednesday (5th of Jan), and I failed the mock exam from Head First book;)