Skip to Content
0
Former Member
Apr 23, 2010 at 08:23 AM

how to compare character with \ ?

36 Views

Hi,

How can I compare a character with backslash ?

when I do

 if  (c == '\') 

then it gives error invalid character constant

I cant even declare string with this value like

 String str = "\"; 

this gives error string literal is not properly closed by double qoute

thanks in advance

B