Meaningless Drivel is fun!*
The moose likes Cattle Drive and the fly likes break statement 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 » This Site » Cattle Drive
Bookmark "break statement" Watch "break statement" New topic
Author

break statement

Nath Maniedeo
Greenhorn

Joined: Feb 15, 2008
Posts: 29
what's meant by insert a linebreak - is that just inserting a blank line like this System.out.println(); ??
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
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

Joined: Jul 22, 2000
Posts: 9044
    
  10
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 ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
 
subject: break statement
 
Similar Threads
XML, flat files to database
Approach for "Say", part a
JSP and Access
Inserting space
Game on SQL