Java String 裏面輸入跳脫 字符 '

In Java, 能夠用 \ 符號來跳脫雙引號:express

\ 跟在須要跳脫符號的前面。app

String value = " \"ROM\" ";

Linux 裏面的 這個符號 \ 也是跳脫特殊符號的意思。this

[dmtsai@study ~]$ grep -n '\.$' regular_express.txt
1:"Open Source" is a good mechanism to develop programs.
2:apple is my favorite food.
3:Football game is not use feet only.
4:this dress doesn't fit me.
10:motorcycle is cheap than car.
11:This window is clear.
12:the symbol '*' is represented as start.
15:You are the best is mean you are the no. 1.
16:The world <Happy> is the same with "glad".
17:I like dog.
18:google is the best tools for search keyword.
20:go! go! Let's go.

特別注意到,因為小數點具備其餘意義(底下會介紹),因此必須要使用跳脫字元(\)來加以解除其特殊意義!google

相關文章
相關標籤/搜索