This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Formating issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Formating issues

Clayton Blankinship

Joined: Feb 14, 2013
Posts: 14
So this program runs with this data file, I am just wondering if there is anyone that can help me format the output so that it looks clean?

The first three columns are good, but the last does not line up properly. Also any suggestions or pointers on the coding would be much appreciated.

Here is the data if you want to give it a try:

1000 1 1200
1001 2 800
1002 3 300
1003 6 1100
1004 2 -100
1005 3 783
1006 1 1550
1007 5 950
1008 1 750
1009 2 1050
1010 2 600
1011 4 700
1012 3 1200
1013 3 0
0 0 0

Winston Gutkowski

Joined: Mar 17, 2011
Posts: 7492

Clayton Blankinship wrote:So this program runs with this data file...


You don't get better answers by simply opening a new thread on the same subject under a different title.

If you don't like the answers you got there, then explain why.

Locking this thread.


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
It is sorta covered in the JavaRanch Style Guide.
subject: Formating issues
Similar Threads
How to call data from a file in a while loop?
Unreachable statement
A Beginner's Program - Comments?
Reading Array values from a file