On page 107 of "OCA Java SE 8 Programmer 1", the substring() method signatures are listed as follow:
int substring(int beginIndex)
int substring(int beginIndex, int endIndex)
But substring() returns part of a String. Hence, correct signatures are as follow:
String substring(int beginIndex)
String substring(int beginIndex, int endIndex)
But substring() returns part of a String. Hence, correct signatures are as follow:
String substring(int beginIndex)
String substring(int beginIndex, int endIndex)
True! As far as I can see, it's not yet listed in the confirmed errata list, so you discovered another errata item. Jeanne & Scott will be very thankful!
But substring() returns part of a String. Hence, correct signatures are as follow:
String substring(int beginIndex)
String substring(int beginIndex, int endIndex)
True! As far as I can see, it's not yet listed in the confirmed errata list, so you discovered another errata item. Jeanne & Scott will be very thankful!
Hope it helps!
Kind regards,
Roel
In the good old days if you wrote in with an erratum the publisher would mail you a free copy of the next edition.
Roel De Nijs wrote:True! As far as I can see, it's not yet listed in the confirmed errata list, so you discovered another errata item. Jeanne & Scott will be very thankful!
Guillermo Ishi wrote:In the good old days if you wrote in with an erratum the publisher would mail you a free copy of the next edition.
Heh. it's hard to get publishers to even post errata these days. I actually like having it on our blog (and here.) Makes for better discussion/searchability/faster response.