第一种自己敲,直接按sop直接输出的是System.out.printf
public class Hello {
public static void main(String[] args) {
System.out.printf("hello,world!");
// 输出语句
}}
打印输出如下,没有换行
hello,world!
进程已结束,退出代码0
对比课程上的第二种按按sop应该输出的是System.out.println
public class Hello {
public static void main(String[] args) {
System.out.println("hello,world!");
// 输出语句
}}
打印输出如下,有换行
hello,world!
进程已结束,退出代码0