AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing commands

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
djtlvnv
Guest





PostPosted: Tue Nov 22, 2005 10:38 pm    Post subject: Printing commands Reply with quote



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





PostPosted: Tue Nov 22, 2005 10:41 pm    Post subject: Re: Printing commands Reply with quote



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





PostPosted: Tue Nov 22, 2005 10:56 pm    Post subject: Re: Printing commands Reply with quote




"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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.