View Single Post
Old 10-25-2012, 04:39 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Table is a bit ambiguous here. I assume you mean a tabular style command line output?
That's done by simply using tabs. In Java, you simply provide the \t character to indicate a tab. Since this looks like a school assignment, I can't just provide you the code, but I can certainly provide an example:
PHP Code:
System.out.println("firstcolumn\tSecondColumn\tThirdColumn"); 
The \t is important, but you can separate these into multiple System.out.print instead of println to make it clearer. Make sure you finish with a println (even if you provide it with nothing), or add a \n for the last column at the end.

As for incrementing, that indicates you need to loop to a condition and increase by an amount. A simple for loop can do this for you.

Also, in the future please wrap your code in [php][/php] or [code][/code] tags to preserve the format.
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
Basic Chaos (10-25-2012)