In Java, should I escape a single quotation mark (') in String (double quoted)? -
in java, \'
denotes single quotation mark (single quote) character, , \"
denotes double quotation mark (double quote) character.
so, string s = "i\'m human.";
works well.
however, string s = "i'm human."
not make compile errors, either.
likewise, char c = '\"';
works, char c = '"';
works.
in java, better use? in html or css, things style="font-family:'arial unicode ms';"
more (and such tags, think it's way use quotation marks), in java, saw people use escape characters "i\'m human."
you don't need escape '
character in string (wrapped in "
), , don't have escape "
character in char (wrapped in '
).
Comments
Post a Comment