Java Software Solutions >EX2.3 > Solution

Problem:

What is wrong with the following program statement? How can
it be fixed?
System.out.println ("To be or not to be, that
is the question.");

Output:

Not Applicable

Solution:

The string to be printed is not all on one line. The problem can be fixed by using the string concatenation operator (+) or by using a print statement for part of the string and a println statement for the remainder of the string.

No comments:

Post a Comment