 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
djtlvnv Guest
|
Posted: Tue Nov 22, 2005 10:38 pm Post subject: Printing commands |
|
|
Hi.
I am using System.out.print() inside a for loop to print a series of
items to the screen on the same line. After the for loop has
completed, I want the next series of items to print to a new line
(instead of printing to the same line as the first series). What is
the command to do this?
Any help would be greatly appreciated.
Thanks
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Tue Nov 22, 2005 10:41 pm Post subject: Re: Printing commands |
|
|
On 22 Nov 2005 14:38:13 -0800, "djtlvnv" <djtippetts (AT) cox (DOT) net> wrote,
quoted or indirectly quoted someone who said :
| Quote: | I am using System.out.print() inside a for loop to print a series of
items to the screen on the same line. After the for loop has
completed, I want the next series of items to print to a new line
(instead of printing to the same line as the first series). What is
the command to do this?
|
intermixing print and println should solve it.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
|
| Back to top |
|
 |
Rhino Guest
|
Posted: Tue Nov 22, 2005 10:56 pm Post subject: Re: Printing commands |
|
|
"Roedy Green" <my_email_is_posted_on_my_website (AT) munged (DOT) invalid> wrote in
message news:pk77o19gvqu9eg4qvnb21a7s6ephts0v3u (AT) 4ax (DOT) com...
| Quote: | On 22 Nov 2005 14:38:13 -0800, "djtlvnv" <djtippetts (AT) cox (DOT) net> wrote,
quoted or indirectly quoted someone who said :
I am using System.out.print() inside a for loop to print a series of
items to the screen on the same line. After the for loop has
completed, I want the next series of items to print to a new line
(instead of printing to the same line as the first series). What is
the command to do this?
intermixing print and println should solve it.
|
In other words, use System.out.print() to write anything you want to a given
line. When you're ready to start a new line, execute: System.out.println();
Whatever you print next, via print() or println() will appear on the next
line.
Rhino
| Quote: | --
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|