Page 1 of 1

About Question enthuware.ocpjp.v17.2.3672 :

Posted: Tue Feb 27, 2024 5:03 pm
by likejudo

Code: Select all

        String s = "["+"""
                                                """+"]";
        System.out.println(s);
I was surprised to see the output is:
[]
even though there are leading spaces?!

Re: About Question enthuware.ocpjp.v17.2.3672 :

Posted: Tue Feb 27, 2024 9:13 pm
by admin
Not sure if you are asking a question or merely noting that you are surprised. Just in case you are asking why, you need to find out what is essential and what is incidental white space instead of focusing on leading whitespace and non leading whitespace.