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.