java - How to make the list go beside each other (horizontally) instead of going down (vertically).

StackOverflow https://stackoverflow.com/questions/18063751

  •  23-06-2022
  •  | 
  •  

Question

how do I make the list go beside each other (horizontally) instead of going down (vertically).

Example:

January (this is what I keep getting) S M T W T F S 1

2

3

4

5

...

January (this is what I wanted to get) S M T W T F S 1 2 3 4 5 6 7 8 9 ...

Thanks any help would be appreciated, I'm new at this and I can't figure it out. :)

Was it helpful?

Solution

Use :

System.out.print("Value");

instead of :

System.out.println("Value");

And don't forget to add a

System.out.println(""); 

at the end to flush the buffer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top