【发布时间】:2013-12-23 12:17:36
【问题描述】:
我有以下字符串
String str = " Hello There \n How are you "
我正在尝试使用 System.out.println(str); 和 System.out.print(str); 打印它
但我得到的只是Hello There
我怎样才能全部打印出来?
【问题讨论】:
-
应该可以。你是如何运行你的程序的?
-
@Keppil 使用 eclipse,因为我正在编写 Android 应用程序
-
你的 IDE 没关系。你的代码是对的。
-
@Sergi 那为什么我只得到了一半的句子?
-
工作证明:ideone.com/tDcigS