System.out.println example
println will append a new line after the string.
public class Main { public static void main(String[] args) { System.out.print("A" + "1"); System.out.print("B"); System.out.print("C"); } }
A1BC
System.out.print example
print will not append a new line after the string.
public class Main2 { public static void main(String[] args) { System.out.println("A" + "1"); System.out.println("B"); System.out.println("C"); } }
A1 B C