+ 1
I want to place a space instead of a new line in java, but how đ€?
What can i use so that my new line text should start from current line text end position. Like in python we use print(end="" ) but i don't in java what syntax is used? Thanks for advanceđ.
4 Answers
+ 4
You just use the print() method instead of the println() method.
+ 2
The simplest way to properly space your output in Java is by adding manual spacing. For instance, to output three different integers, "i," "j" and "k," with a space between each integer, use the following code:
System.out.println(i + " " + j + " " + k);
+ 2