集册 Java实例教程 用一条语句显示多行文本

用一条语句显示多行文本

欢马劈雪     最近更新时间:2020-01-02 10:19:05

620
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
Escape sequence Description
\n Newline.
\t Horizontal tab.
\r Carriage return.
\\ Backslash.
\" Double quote. System.out.println("\"in quotes\""); displays "in quotes".

public class Main 

{//from n o w j a   v  a . c o m - 时  代  Java

   // main method begins execution of Java application

   public static void main(String[] args)

   {

      System.out.println("Welcome\nto\nJava\nProgramming!");

   } 

}