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

我只是一个虾纸丫 提交于 2020-01-11 13:54:42

问题


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. :)


回答1:


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.



来源:https://stackoverflow.com/questions/18063751/java-how-to-make-the-list-go-beside-each-other-horizontally-instead-of-going

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!