Java 转义字符

题目描述

编写一个程序,只调用一次System.out.println(),以输出下列信息:
“flower”“sun”“our’s”
“123”

输入描述

输出描述

见样例输出,最后有一个换行

输出样例

"flower"\"sun"\"our's"\
"123"
import java.util.Scanner;
public class Main{
    
    
    public static void main(String args[]) {
    
    
        System.out.println("\"flower\"" + "\\" + "\"sun\"" + "\\" + "\"our's\"" + "\\" + "\n" + "\"123\"");
    }
}

猜你喜欢

转载自blog.csdn.net/qq_44989881/article/details/112547238