• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Possible typo in answer of question 46 in chapter 1 (Practice Tests)

 
Ranch Hand
Posts: 72
5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With reference to chapter 1 of OCP Oracle Certified Professional Java SE 17 Developer Practice Tests: Exam 1Z0-829 (English Edition), question 46.  The code seems to have a trailing space as also indicated by the answer.  



Would the trim() method get rid of this trailing space?  The answer seems to indicate that it does not.

B, F. The original sample prints false, followed by george likes bananas with a trailing space.


 
author & internet detective
Posts: 41936
910
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats! You found the first error. I've logged it and credited you on the errata page.

Incidentally, you got the book before we did! That's why there is a question mark for the page #. I don't know the page # until I have the printed book.
 
reply
    Bookmark Topic Watch Topic
  • New Topic