java中.的转译为什么是\\ 不是\
时间: 2023-09-16 13:14:09 浏览: 199
在Java中,字符.的转义是\\。这是因为在Java中,\\是用来表示反斜线的转义字符。所以如果要在字符串中表示字符.,需要使用两个反斜线\\\\来转义表示,即\\\\.。这样Java编译器才能正确地解析并识别出.字符。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [JASIC:一种WIP语言,具有类似于BASIC语法的Java。 “转译”为Java](https://download.csdn.net/download/weixin_42104366/15318639)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [java转译字符](https://blog.csdn.net/weixin_42819452/article/details/100556789)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [java2mirah:一个 java to mirah 转译器](https://download.csdn.net/download/weixin_42131316/19719599)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文