Illegal Escape Character “\”

The character ‘\’ is a special character and needs to be escaped when used as part of a String, e.g., “\”. Here is an example of a string comparison using the ‘\’ character:

if (invName.substring(j,k).equals("\\")) {...}

You can also perform direct character comparisons using logic similar to the following:

if (invName.charAt(j) == '\\') {...}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)