About Question enthuware.ocajp.i.v8.2.1225
Posted: Sun Dec 04, 2016 1:48 am
Hi,
the question item enthuware.ocajp.i.v8.2.1225 seems not correct.
The Option: "It throws StringIndexOutOfBoundsException if passed a value higher than or equal to the length of the string (or less than 0)." is a valid option.
The Java Docs (https://docs.oracle.com/javase/8/docs/api/) are not precise here. A StringIndexOutOfBoundsException will be thrown beside the fact that its base class is
of IndexOutOfBoundsException.
Anyway, the more specific solution (Option with StringIndexOutOfBoundsException) is treated as an error here, despite the fact that it is correct.
I am using Java 1.8.0_60 and checked also the jdk sources of the String class. Question Bank version is 1/44.
Maybe I missed something or the issue has been reported already. In that case I say "Sorry" for bothering you.
Happy day
STephan
the question item enthuware.ocajp.i.v8.2.1225 seems not correct.
The Option: "It throws StringIndexOutOfBoundsException if passed a value higher than or equal to the length of the string (or less than 0)." is a valid option.
The Java Docs (https://docs.oracle.com/javase/8/docs/api/) are not precise here. A StringIndexOutOfBoundsException will be thrown beside the fact that its base class is
of IndexOutOfBoundsException.
Anyway, the more specific solution (Option with StringIndexOutOfBoundsException) is treated as an error here, despite the fact that it is correct.
I am using Java 1.8.0_60 and checked also the jdk sources of the String class. Question Bank version is 1/44.
Maybe I missed something or the issue has been reported already. In that case I say "Sorry" for bothering you.
Happy day
STephan