Error in OCAJP Java 8 book
Posted: Mon Jul 20, 2020 3:44 am
Hello,
there is an error in section "12.1.3 Manipulating Strings" in the example code that a string manipulation method returns the same string if it is unchanged:
The strip method was introduced in Java 11 and therefore is not available in Java 8
Best regards
ardurn
there is an error in section "12.1.3 Manipulating Strings" in the example code that a string manipulation method returns the same string if it is unchanged:
Code: Select all
System.out.println(s1.strip() == s1);
Best regards
ardurn