Tried it on openjdk version "15" 2020-09-15
Following simple line
String str = "\s";
According to official documentation of list of escape characters, \s is not defined.
Spring tool suite does not show compilation error for '\s' nor does when I compile on command line using maven. Any other characters such as \p result into following error which matches with official documentation.
Invalid escape sequence (valid ones are \b \t \n \f \r " ' \ )
Why doesn't java compiler complain about \s? Printing the resultant string on console indicates that it's outputting space character (0x20), so looks like it's recognizing it, but just not documented.
This is a new escape sequence in Java 15:
https://docs.oracle.com/en/java/javase/15/text-blocks/index.html
The tutorial you linked to is for Java 8, but you are on JDK 15.