Java String 里面输入跳脱 字符 \
2016-06-20 11:13
627 查看
摘要: How to enter quotes in a Java string?
In Java, 可以用
\ 跟在需要跳脱符号的前面。
Linux 里面的 这个符号 \ 也是跳脱特殊符号的意思。
特別注意到,因為小數點具有其他意義(底下會介紹),所以必須要使用跳脫字元(\)來加以解除其特殊意義!
In Java, 可以用
\ 符号来跳脱双引号:
\ 跟在需要跳脱符号的前面。
String value = " \"ROM\" ";
Linux 里面的 这个符号 \ 也是跳脱特殊符号的意思。
[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.
特別注意到,因為小數點具有其他意義(底下會介紹),所以必須要使用跳脫字元(\)來加以解除其特殊意義!
相关文章推荐
- java对世界各个时区(TimeZone)的通用转换处理方法(转载)
- java-注解annotation
- java-模拟tomcat服务器
- java-用HttpURLConnection发送Http请求.
- java-WEB中的监听器Lisener
- Linux socket 初步
- Android IPC进程间通讯机制
- Android之获取手机上的图片和视频缩略图thumbnails
- android string.xml文件中的整型和string型代替
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 介绍一款信息管理系统的开源框架---jeecg
- 10 篇对初学者和专家都有用的 Linux 命令教程