Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

break statement

 
Nath Maniedeo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's meant by insert a linebreak - is that just inserting a blank line like this System.out.println(); ??
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nath,

"Insert a line break" means you've come to the end of a line and you want to start a new one.

Why not give it a try... what do you see when you use the methods System.out.print or System.out.println ?


Oh, I almost forgot: welcome to JavaRanch and the Cattle Drive!
[ March 16, 2008: Message edited by: Pauline McNamara ]
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A "line break" means that you stop printing on the same line and go to the next line. Usually the next line is not blank, although it can be.

Notice how


gives you a different result (no line break) than (a break at the end of each printed line)??

Notice how "line break" is used in context in the write data out page.
[ March 17, 2008: Message edited by: Marilyn de Queiroz ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic