Computer Science, asked by michaelmack99, 1 year ago

please sow me the output

Attachments:

Answers

Answered by siddhartharao77
8
(i) BEST OF LUCK.

Print statement prints the output on the same line.


Attachments:

michaelmack99: but in the next there println
siddhartharao77: It starts from there itself.
siddhartharao77: Now u check my answer again. I have edited it. Refresh the page.
AleenaAnnaRobin: BEST OF LUCK is correct
AleenaAnnaRobin: Println sends the control to the next line after printing
siddhartharao77: Thanks
Answered by Rajdeep11111
16
HEY FRIEND!

Note two things first.

#1. When the statement is System.out.print(), after printing the thing, the cursor remains in the same line.

#2. When the statement is System.out.println(), after printing the thing, the cursor moves on to the next line.

Hence, the first code is:
System.out.print("BEST");
After BEST is printed, the cursor remains in the same line.

The next code is:
System.out.println("OF LUCK");
In the same line, OF LUCK is printed and then the cursor skips to the next line.

Thus, the output is:

BEST OF LUCK.


THANKS!
Similar questions