如何解决引用和意图
The following is a quote:
"Now is the time
for all "good" men
to come to the
aid of their party"
public class Quote {
public static void main(String arg[]) {
System.out.println("The following is a quote:\n\"Now is the time\nfor all\"good\"men\ntocome to the\naid of their party\"");
}
}
解决方法
您可以这样做-
System.out.println("The following is a quote:\n"+"now is the time\nfor all \"good\" men \nto come to the\naid of their party");
输出:
The following is a quote:
now is the time
for all "good" men
to come to the
aid of their party
System.out.println("The following is a quote:\nnow is the time for all \"good\" men to come to the aid of their party");
输出-
The following is a quote:
now is the time for all "good" men to come to the aid of their party
在Java中,您可以使用\
示例-System.out.println("This is \"10\"");
要打印"
,请使用\
之类的\"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。