473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

String continuation on next line

Hi,

I've searched all my Java books ans newsgroup archives and found nothing.
Once I thought that I saw a character at the end of a line allowed a String
literal to span multiple lines.

I have some XSLT code that I want to write out with one println( )
statement. The XSLT code is several lines long.

Does anyone remember a String literal line continuation character?

Thank you,
Don
Sep 4 '05 #1
2 66900
In article <hr********************@adelphia.com>, do*@leckieinc.com
writes...
Hi,

I've searched all my Java books ans newsgroup archives and found nothing.
Once I thought that I saw a character at the end of a line allowed a String
literal to span multiple lines.

I have some XSLT code that I want to write out with one println( )
statement. The XSLT code is several lines long.

Does anyone remember a String literal line continuation character?


Too much VB can affect you that way ;-)
"VB is a popular Australian beer " & _
"as well as Visual Basic)

AFAIK there is no such thing in Java.

String answer = "Java statements continue " +
"from line\nto line\n" +
"until they are terminated with a semicolon, " +
"so there is no need for any special construct";
System.out.println(answer);

--
DM
personal opinion only
Sep 5 '05 #2
Hi David,

Thank you. Guess I was dreaming that I once saw it.

Don
"David Moss" <q0******@mail.connect.usq.edu.au> wrote in message
news:MP************************@news.bigpond.com.. .
In article <hr********************@adelphia.com>, do*@leckieinc.com
writes...
Hi,

I've searched all my Java books ans newsgroup archives and found nothing.
Once I thought that I saw a character at the end of a line allowed a
String
literal to span multiple lines.

I have some XSLT code that I want to write out with one println( )
statement. The XSLT code is several lines long.

Does anyone remember a String literal line continuation character?


Too much VB can affect you that way ;-)
"VB is a popular Australian beer " & _
"as well as Visual Basic)

AFAIK there is no such thing in Java.

String answer = "Java statements continue " +
"from line\nto line\n" +
"until they are terminated with a semicolon, " +
"so there is no need for any special construct";
System.out.println(answer);

--
DM
personal opinion only

Sep 5 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: les_ander | last post by:
Hi, suppose I am reading lines from a file or stdin. I want to just "peek" in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to...
3
by: rasdj | last post by:
I have a lot of SQL to convert to postgres from oracle. I have most of the problems worked out except for this last bit. Many of my tables need the last comma replaced with a close parenthesis -...
6
by: Jacob Rael | last post by:
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to...
3
by: psbasha | last post by:
Hi , I am following backslash ('\') as continuation of line as per the coding guidelines.Is there any other character to be used as continuation of line? Thanks in advance PSB
2
by: srini4vasan | last post by:
#include <stdio.h> int main() { char n, m; puts (" Enter the first string and . to terminate :"); do { n = getchar(); putchar(n);
4
by: fhwa | last post by:
ok, I'm trying to write a string code and currently the code works however I've run out of room and I need to change some of the source names it pulls from. Changing the source names create the...
4
by: Vernon Wenberg III | last post by:
I'm not really sure how readline() works. Is there a way to iterate through a file with multiple lines and then putting each line in a variable in a loop?
2
by: deenar | last post by:
Hi I'm having problems with Java in reading the next line in a text file to execute to find a solution. My program is read the data from the text file and excute it and provide the answer on the...
3
by: Sparkey | last post by:
I have a working code that gives me the prime numbers but I want it to print out either a - if it not a prime and if it is a prime print the prime. I have that working but I can not get it to stop at...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.