please sow me the output
Attachments:
Answers
Answered by
8
(i) BEST OF LUCK.
Print statement prints the output on the same line.
Print statement prints the output on the same line.
Attachments:
michaelmack99:
but in the next there println
Answered by
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!
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