Quotation Mark Java String

Answers. String name = “”john”” You have to escape the second pair of quotation marks using the character in front..Method . Using Backslash as an Escape Character. Type the escape character . As you know, the double quote symbol ” has special meaning in Java displaying text . Type ” to display the double quote. Continue your code as usual. Remember to insert ordinary Java quotes as needed..These quotation marks are not displayed, which brings up a good question What if you want to display double quotation marks? To display them, Java has created a special code that can be put into a string “. Whenever this code is encountered in a string, it is replaced with a double quotation mark..

Posting Komentar

0 Komentar