嗨,我遇到了这个JAVA课程的问题.我知道这很简单,但它对我不起作用.
我到目前为止的代码是这样的:
public class ShowEscapeSequences {
public static void main(String[] args) {
System.out.print("I really like \n\t\"CIS355A\"Business Application Programming with Lab using JAVA\"");
}//End of main
}
Run Code Online (Sandbox Code Playgroud)
它给出了这个输出:
I really like
"CIS355A"Business Application Programming with Lab using JAVA"
Run Code Online (Sandbox Code Playgroud)
但我需要输出看起来像这样:
I really like
CIS355A
"Business Application Programming with Lab using JAVA"
Run Code Online (Sandbox Code Playgroud)
如何在不产生100个错误的情况下执行此操作?
你的字符串需要
"I really like\n\n\tCIS355A \n\t\t \"Business Application Programming with Lab using JAVA\""
Run Code Online (Sandbox Code Playgroud)
这是基于查看问题中的原始文本.