Yes, that is mostly, but not entirely true. But it doesn't change the fact that a backslash is always represented by \\.

Btw, this is also valid:
char c = '\\';

Conversively, I have also seen generated code that failed because the username started with a 'u':
// Imported from c:\program files\documents\uri\etc\etc

In this case the compile will complain that the line contains an invalid character.

Regards,
    Erik.


Op 28-08-10 21:33, Grant Birchmeier schreef:
Outside of some double-quotes, I'm pretty sure \\ is just a junk token.

On Sat, Aug 28, 2010 at 2:26 PM, Erik van Oosten <e.vanoos...@grons.nl <mailto:e.vanoos...@grons.nl>> wrote:

    Why is that better? In *all* java code a backslash is represented
    by \\.

    Regards,
       Erik.


    Op 27-08-10 23:50, Ceki Gülcü schreef:


        Thanks David.

        On 27/08/2010 11:01 PM, David Balažic wrote:

            Hi!

            On page http://www.slf4j.org/faq.html#logging_performance
            It says:
            Note that within Java code, the backslash cracacter needs
            to be written as '\\'.

            Better:
            Note that within Java strings, the backslash character
            needs to be written as '\\'.


            On http://www.slf4j.org/manual.html :
            For example, the slf4j-log12-1.6.1.jar binding is bound at
            compile time to use log4j.

            It should be slf4j-log4j12-1.6.1.jar , I guess.


            Regards,
            David Balažic

        _______________________________________________
        slf4j-user mailing list
        slf4j-user@qos.ch <mailto:slf4j-user@qos.ch>
        http://qos.ch/mailman/listinfo/slf4j-user



-- Erik van Oosten
    http://www.day-to-day-stuff.blogspot.com/


    _______________________________________________
    slf4j-user mailing list
    slf4j-user@qos.ch <mailto:slf4j-user@qos.ch>
    http://qos.ch/mailman/listinfo/slf4j-user



_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://qos.ch/mailman/listinfo/slf4j-user

--
Sent from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://qos.ch/mailman/listinfo/slf4j-user

Reply via email to