刚开始使用 Java(对于 Android,如果重要的话),我想要的只是在运行时写入控制台。在 AS3 中是 trace(),在 C# 中是 Console.Write()...在 Java 中是什么?
我认为这个问题非常基础/简单,以至于我很难向 Google 表达我的问题; Stackoverflow 助你一臂之力! :)
最佳答案
System.out.print --> This will print without a final newline-character
System.out.println --> This will print with a newline-character, but is the same as the above System.out.printf --> This will accept format-specfiers, where the first argument is the mask and the other arguments are replacements.
http://sharkysoft.com/archive/printf/docs/javadocs/lava/clib/stdio/doc-files/specification.htm
这将在您执行“Android Java”时起作用,如果您使用 Eclipse,它将显示在 LogCat 中
Log.d/w/e... --> Android
http://developer.android.com/reference/android/util/Log.html
关于java - 简单问题 - Java 中的 trace()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6170240/