java中System.out.print()与System.out.println()的区别

System.out.print();与System.out.println();
前者输出不换行,比如:
System.out.print("a");
System.out.print("b");
结果:
ab

后者输出后换行,比如:
System.out.println("a");
System.out.println("b");
结果:
a
b

猜你喜欢

转载自blog.csdn.net/hellosweet1/article/details/81190953