加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

几个特殊字符在String中的转义表达式

发布时间:2020-12-14 06:39:12 所属栏目:Java 来源:网络整理
导读://输出: System.out.println("单引号--------------"); System.out.println(str1); System.out.println(); System.out.println("双引号--------------"); System.out.println(str2); System.out.println(); System.out.println("反斜线--------------"); Sys

    //输出:
    System.out.println("单引号--------------");
    System.out.println(str1);
    System.out.println();

    System.out.println("双引号--------------");
    System.out.println(str2);
    System.out.println();

    System.out.println("反斜线--------------");
    System.out.println(str3);
    System.out.println();

    System.out.println("制表符--------------");
    System.out.println(str4);
    System.out.println();

    System.out.println("回退符--------------");
    System.out.println(str5);
    System.out.println();

    System.out.println("回车符--------------");
    System.out.println(str6);
    System.out.println();

    System.out.println("走纸符--------------");
    System.out.println(str7);
    System.out.println();

    System.out.println("换行符--------------");
    System.out.println(str8);
    System.out.println();

}

}
<span style="font-size:14px;">

双引号--------------
I"love"working!

反斜线--------------
Iloveworking!

制表符--------------
I love working!

回退符--------------
Iloveworking!

回车符--------------
working!

走纸符--------------
I love working!

换行符--------------
I
love
working!


<span style="font-size:14px;">

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读